android - Add a "," in a string where in it there is this: "}{" -


I am working in an Android app and I am in the "jsonstring" in the first "} {" between "," I can work with string # split () for example I have:

  {"field1": "a", "field2": "abcbab", "field3" : "Field1": "field2": "field2": "faff", "field 3": 25} {"field 1": "A", "field 2": "fede", "field 3" : 12}  

How can I do that?

Try this:

  string newJsonStr = yourJsonStr.replaceAll (" \\} \\ s * \\ {","}, {");  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -