Parsing string to Json in the Constructor
HY!!
开发者_Python百科I have a Json class, so i will parse in the constructor the json string to JSonObject.
public class JSONParse extends JSONObject {
public JSONParse(string json) {
//pseudo code
this.obj = new JSONObject(EntityUtils.toString(json));
}
}
please help
I'm not 100% sure on what your question is, but I guess this is what you want?
public class JSONParse extends JSONObject {
public JSONParse(String json) throws JSONException {
super(json);
}
}
- json java parser
精彩评论