               (do (.unread stream c)
                   float?))))]
     (if floating-point?
-      (Double/valueOf (str buffer))
+      (if *bigdec*
+        (bigdec (str buffer))
+        (Double/valueOf (str buffer)))
       (Long/valueOf (str buffer)))))
 
-(defn- do-parse
+(defn- -parse
   [^PushbackReader stream eof-error? eof-value]
   (loop []
     (let [c (.read stream)]

             (throw (Exception. "JSON error (key missing value in object)")))

        (do (.unread stream c)
            (let [element (do-parse stream true nil)]
              (if (nil? key)
                (if (string? element)
                  (recur element result)

  clojure.data.json-new
  (:require [clojure.pprint :as pprint])
  (:import (java.io PrintWriter PushbackReader StringWriter
                    StringReader EOFException)))

;;; JSON READER

(def ^:dynamic ^:private *keywordize*)
(def ^:dynamic ^:private *bigdec*)

(declare -parse)

(defmacro ^:private codepoint [c]
  (int c))
