 (defn add-common-json-encoders!*
   "Non-memoize version of add-common-json-encoders!"
   []
+  (add-encoder
+   PgArray
+   (fn [^PgArray data ^JsonGenerator generator]
+     ;; If .getArray returns a copy, this approach could be expensive
+     ;; for large values.
+     (encode-seq (.getArray data) generator)))
   (add-encoder
     org.postgresql.util.PGobject
     (fn [^PGobject data ^JsonGenerator jsonGenerator]

            [cheshire.parse :as parse]
            [clojure.java.io :as io]
            [clojure.set :as set]
            [puppetlabs.puppetdb.time :as time]))

(defrecord RawJsonString [data])



   This namespace when 'required' will also setup some common JSON encoders
   globally, so you can avoid doing this for each call."
  (:require [cheshire.core :as core]
            [cheshire.factory :as factory]
            [cheshire.generate :as generate
