title: Convert Base64 string to JSON in android
body: <p>I have Base64 Encoded string and want to convert it to JSON object.</p>
  
  <p>Here is encoded String</p>
  
  <p><code>/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQU...</code></p>
  
  <p>Here is how i am doing.</p>
  
  <pre><code> String json = {"image": encode_string};
          try{
              JSONObject obj =  new JSONObject(json);
              Log.d("My App", obj.toString());
          }catch (Throwable t){
              t.printStackTrace();
          }
  </code></pre>
  
  <p>But when i write this line <code>String json = {"image":encode_string};</code>i got compile time error.</p>
  
  <blockquote>
    <p>Unexpected Token</p>
  </blockquote>
  
  <p>How to resolve that Thanks in advance.</p>