{
"error":null,
"countries":[
{
"id":1,
"description":"Slovensko",
"locale":"sk_SK",
"zipRegexp":"/^\\d{3}\\ ?\\d{2}$/"
},
{
"id":2,
"description":"Česká republika",
"locale":"cs_CZ",
"zipRegexp":null
},
{
"id":3,
"description":"Afganistan",
"locale":"en_EN",
"zipRegexp":null
}
]
}
and so on so on, now I need to convert it to JsonObject on Android. But I cannot convert it to String because of double commas. How can it be done? I need somethink like this:
JsonObjet.JsonFromString('{"error":null,"countries":[{"id":1,"description":"Slovensko","locale":"sk_SK","zipRegexp":"/^\\d{3}\\ ?\\d{2}$/"},{"id":2,"description":"Česká republika","locale":"cs_CZ","zipRegexp":null}}');
this is not the answer:
JSONObject getJSON = new JSONObject("{"error":null,"countries":[{"id":1,"description":"Slovensko","locale":"sk_SK","zipRegexp":"/^\\d{3}\\ ?\\d{2}$/"},{"id":2,"description":"Česká republika","locale":"cs_CZ","zipRegexp":null}}");
because of double commas.
thanks