[英]Parsing a json string in java
I am trying to parse a json string of the format : 我试图解析格式的json字符串:
{"magha": {"2014-04-04 14:27:08.669217": "125"}}
I am not able to create a parser for the same. 我无法为其创建解析器。 Looking forward for any help.
期待任何帮助。
Download the json-lib-jar 下载json-lib-jar
Use JSONObject
使用
JSONObject
Do like this 这样做
JSONObject jobject=new JSONObject(yourjsonstring);
String magha=jobject.getString("magha");
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.