title: Java JSON parse array
body: <p>I am using the following library to parse an object:</p>
  
  <pre><code>{"name": "web", "services": []}
  </code></pre>
  
  <p>And the following code</p>
  
  <pre><code>import com.json.parsers.JSONParser;
  
  
  JSONParser parser = new JSONParser();
  Object obj = parser.parseJson(stringJson);
  </code></pre>
  
  <p>when the array services is empty, it displays the following error</p>
  
  <pre><code>@Key-Heirarchy::root/services[0]/   @Key::  Value is expected but found empty...@Position::29
  </code></pre>
  
  <p>if the array services has an element everything works fine</p>
  
  <pre><code>{"name": "web", "services": ["one"]}
  </code></pre>
  
  <p>How can I fix this?</p>
  
  <p>Thanks</p>