title: convert a string to json in java
body: <p>I want to convert the stdout of the following python into a json object in Java code.</p>
  
  <pre><code>Process p = Runtime.getRuntime().exec(python one.py);
  
  BufferedReader stdInput = new BufferedReader(new
  InputStreamReader(p.getInputStream()));
  
  while ((s = stdInput.readLine()) != null) {
      System.out.println(s); }
  </code></pre>
  
  <blockquote>
    <p>python <strong>output</strong> sample:  cat-red-fish dog-brown-meat</p>
    
    <p>desired <strong>JSON</strong> : "animal":{"type":"cat", "color":"red", "food":"fish"}...</p>
  </blockquote>
  
  <p>How can I split while passing the output in JSON?</p>