[英]Convert string to 2d array (java)
I am trying to convert string like this: 我正在尝试像这样转换字符串:
{"Shops":[
{"city":"Riga","shops":[{"a":"some info here","b":"...","c":"..."},{"a":"some info here","b":"...","c":"..."}]},{"city":"Liepaja","shops":[{"a":"info here","b":"info....","c":"..."}]
]}
to 2d array, like 到二维数组,像
shops[0][0]=>{"a":"some info here","b":"...","c":"..."}
shops[1][0]=>{"a":"info here","b":"info....","c":"..."}
Is it possible? 可能吗? Is there some easy way to do that? 有一些简单的方法可以做到吗?
I've searched, tried, but I still don't know how to do that. 我已经搜索,尝试过,但是我仍然不知道该怎么做。 I'm new in java. 我是Java新手。
The type of data you have posted is JSON encoded. 您发布的数据类型是JSON编码。 you could use a json encoder and decoder to do this job easily. 您可以使用json编码器和解码器轻松完成此工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.