I have a long clojure String (java.lang.String) representing a JSON. It has \"normal\" looking syntax like so:
\"{ a:1, b:\"hello\" }\"
The key
Depending on your level of desperation, the Groovy JSON Slurper can read this "JSON" in the LAX
setting (which allows those attributes, comments, ...)
Add the following dep:
[org.codehaus.groovy/groovy-json "2.5.6"]
Then you can run:
user=> (import [groovy.json JsonSlurper JsonParserType])
groovy.json.JsonParserType
user=> (def parser (doto (JsonSlurper.) (.setType JsonParserType/LAX)))
#'user/parser
user=> (def data (.parseText parser "{ a:1, b:\"hello\" }"))
#'user/data
user=> data
{"a" 1, "b" "hello"}