Question : Java Servlet Parse JSON String

I'm new to JSON. I'm trying to pass a JSON string like this to  a servlet:
String jsonString = "[
                                  {\"path\", \"/repo/1234\"},
                                   {\"path\", \"/repo/5678\"}
                                ]";

First question, is this the best JSON structure I should use? What I need is just an array with different paths values.

Second question, after I use request.getParameter to get the JSON string, what tool should I use to parse the JSON string?

I'm currently using hidden field to pass the JSON string to the servlet. Is there a better to pass json string or object to a servlet?

Thanks a lot!

Answer : Java Servlet Parse JSON String

>First question, is this the best JSON structure I should use?
simple one, easy to parse like an hash table

>Second question, after I use request.getParameter to get the JSON string, what tool should I use to parse the JSON string?
For example : http://www.json.org/java/index.html
Check this article : http://www.experts-exchange.com/articles/Programming/Languages/Scripting/JavaScript/JSON/Import-and-Export-datas-from-JSON-string-to-Oracle-with-Java-Stored-Procedure.html

You should find some part of code to use the class.
For your needs you need to create a new json object (JSONObject) from string and parse it (JSONTokener)
Random Solutions  
 
programming4us programming4us