开发者

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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜