java - Couchbase: How to create JsonObject from a string -
how convert/parse string representation of json object instance of com.couchbase.client.java.document.json.jsonobject?
you can use jsontranscoder (api document) this.
string rawjson = "{\"companyname\":\"apple\",\"employees\":[{\"name\":\"steve\",\"age\":48},{\"name\":\"michael\",\"age\":39}]}"; jsontranscoder trans = new jsontranscoder(); jsonobject jsonobj = trans.stringtojsonobject(rawjson);
hope :)
Comments
Post a Comment