-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Hello,
I'm aware this is an esoteric edge case, so I'll totally understand if it's labelled won't fix
, but it's illustrated by the following contrived example:
Create input:
(def input
(->
{:regular "hello"
:very-jsonified (cheshire.core/generate-string {:internal (cheshire.core/generate-string {:a 1})})
:jsonified (cheshire.core/generate-string {:a 1})
:another "spam"}
(cheshire.core/generate-string)))
Parsed correctly with cheshire:
(cheshire.core/parse-string input)
;; =>
{"regular" "hello",
"very-jsonified" "{\"internal\":\"{\\\"a\\\":1}\"}",
"jsonified" "{\"a\":1}",
"another" "spam"}
Parsed incorrectly with pjson:
(pjson.core/read-str input)
;; =>
{"regular" "hello",
"very-jsonified" "{\"internal\":\"{\\",
"a\\" ":1}\"}",
"jsonified" "{\"a\":1}",
"another" "spam"}
Thanks for taking the time
Metadata
Metadata
Assignees
Labels
No labels