Rex Lam
Rex Lam

Reputation: 1405

Any things like jQuery parseJSON in Android?

The web service return a JSON string like

"[{\"Id\":\"1\",\"Name\":\"Peter\"}]"

In jQuery, I can use $.parseJSON to convert it to valid JSON string

[{"Id":"1","Name":"Peter"}]

Any similar method in Android?

Upvotes: 0

Views: 197

Answers (1)

Austin Greco
Austin Greco

Reputation: 33554

Android comes with org.json package to parse json, but there are other libraries that might make it easier to convert to java objects:

comes with android sdk:

other downloadble packages:

Upvotes: 2

Related Questions