Skip to content
Snippets Groups Projects
Commit 15bc0f36 authored by Cam Saul's avatar Cam Saul
Browse files

json-serialize wonky Postgres array types

parent 198caa40
Branches
Tags
No related merge requests found
......@@ -21,6 +21,9 @@
;; stringify Postgres binary objects (e.g. PostGIS geometries)
(add-encoder org.postgresql.util.PGobject encode-str)
;; Do the same for PG arrays
(add-encoder org.postgresql.jdbc4.Jdbc4Array encode-str)
;; serialize sql dates (i.e., QueryProcessor results) like YYYY-MM-DD instead of as a full-blown timestamp
(add-encoder java.sql.Date (fn [^java.sql.Date date ^com.fasterxml.jackson.core.JsonGenerator json-generator]
(.writeString json-generator (.toString date))))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment