Hi all,

I'm using clojure.contrib.json library, and I might encounter a bug of
this library.
The bug occurs when I use json-str to a map which contains double
quotation for a key part.

I confirmed the above usign folowing codes (danlarkin's json library
is my expected behavior):

user=>
user=> (use '[clojure.contrib.json])
nil
user=> (def my-hash {"a" 0
     "b" 1
     "c" 2
     "xxx\"xxx" 100})
#'user/my-hash
user=> (json-str my-hash)
"{\"a\":0,\"b\":1,\"c\":2,\"xxx\"xxx\":100}"
user=> (require '(org.danlarkin [json :as json]))
nil
user=> (json/encode my-hash)
"{\"a\":0,\"b\":1,\"c\":2,\"xxx\\\"xxx\":100}"

The version of libraries I used are as follows:
- org.clojure/clojure "1.2.0"
- org.clojure/clojure-contrib "1.2.0"
- org.danlarkin/clojure-json "1.2-SNAPSHOT"

Regards,
Yasuhisa

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to