I have a web service which returns a list of JSON Objects…such as below:
[
{
\"ItemId\":22,
\"ItemName\":\"ASA 5505\",
\"AssetNmbr\":\"\",
\"EmployeeId\":\"\",
\"Type\":\"\",
\"Category\":\"\",
\"PurchaseDt\":\"\",
\"PurchaseBy\":null,
\"IssueDt\":\"\",
\"IssueBy\":null,
\"Price\":\"300.00\",
\"SerialNmbr\":\"JMX1538408E\",
\"MacAddress\":null,
\"LocationNm\":\"Stock\",
\"Notes\":null
}
]
What is the best way to convert this String to a list of Json Objects? Is there something built in to the standard Java library? I tried using Gson, but I had no good results.
There is inbuild class in android to handle the json parsing.
Regarding your example, the [ starts in your string so it means it is array so you have start like as below
///and so on