title: Unable to add label using Neo4j Rest API - Error reading as JSON ''
body: <p>The neo4j rest api throws runtime exception (error reading as JSON '') when trying to add a label.</p>
  
  <p>My current set up</p>
  
  <pre><code>&lt;dependency&gt; 
      &lt;groupId&gt;org.neo4j&lt;/groupId&gt; 
      &lt;artifactId&gt;neo4j-rest-graphdb&lt;/artifactId&gt; 
      &lt;version&gt;2.0.0&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.neo4j&lt;/groupId&gt;
      &lt;artifactId&gt;neo4j&lt;/artifactId&gt;
      &lt;version&gt;2.0.0&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.neo4j.app&lt;/groupId&gt;
      &lt;artifactId&gt;neo4j-server&lt;/artifactId&gt;
      &lt;version&gt;2.0.0&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>Code that tries to create a new node and add a property and label. The runtime exception is thrown when we try to add the label. The rollback is working fine though. It appears that the API is trying to get details for the resource that is not yet created and trying to parse the response.</p>
  
  <pre><code>try ( Transaction tx = db.beginTx() ) {
      //create new user
      Node userNode = db.createNode();
      userNode.setProperty( "id", id );
      userNode.addLabel(DynamicLabel.label("GuestUser")); //throws runtime exception
      tx.success();
  }
  </code></pre>
  
  <p>Stack trace</p>
  
  <pre><code>java.lang.RuntimeException: Error reading as JSON ''
  at org.neo4j.rest.graphdb.util.JsonHelper.readJson(JsonHelper.java:57)
  at org.neo4j.rest.graphdb.util.JsonHelper.jsonToSingleValue(JsonHelper.java:62)
  at org.neo4j.rest.graphdb.RequestResult.toEntity(RequestResult.java:114)
  at org.neo4j.rest.graphdb.RequestResult.toMap(RequestResult.java:120)
  at org.neo4j.rest.graphdb.ExecutingRestAPI.getData(ExecutingRestAPI.java:501)
  at org.neo4j.rest.graphdb.RestAPIFacade.getData(RestAPIFacade.java:179)
  at org.neo4j.rest.graphdb.entity.RestEntity.getStructuralData(RestEntity.java:75)
  at org.neo4j.rest.graphdb.entity.RestNode.labelsPath(RestNode.java:188)
  at org.neo4j.rest.graphdb.entity.RestNode.addLabel(RestNode.java:147)
  
  Caused by: java.io.EOFException: No content to map to Object due to end of input
  at org.codehaus.jackson.map.ObjectMapper._initForReading(ObjectMapper.java:2775)
  ...
  at org.neo4j.rest.graphdb.util.JsonHelper.readJson(JsonHelper.java:55)
  ... 43 more
  </code></pre>
  
  <p>Has anyone seen this problem so far.</p>