title: Parsing a JSON string in Java
body: <p>I have a JSON string in the format</p>
  
  <blockquote>
    <p>{"id":100,"nickname":"yash","name":"Rahul"}</p>
  </blockquote>
  
  <p>which i got with the code below: </p>
  
  <pre><code>import java.io.IOException;
  import java.io.StringWriter;
  import org.json.simple.JSONArray;
  import org.json.simple.JSONObject;
  import org.json.simple.JSONValue;
  
      public class Json {
          public static void main(String str[]) throws IOException
          {
  
            JSONObject obj=new JSONObject();
            obj.put("name","Rahul");
            obj.put("id",100);
            obj.put("nickname","yash");
            StringWriter out = new StringWriter();
            obj.writeJSONString(out);
            String jsonText = out.toString();
            System.out.println(jsonText);
              }
      }
  </code></pre>
  
  <p>Now, how do i parse this JSON string and get the values??</p>