code: protected Item updateItem( Item item,
                                 JSONObject jsonItem ) throws RepositoryException, JSONException {
          if (item instanceof Node) {
              return updateNode((Node)item, jsonItem);
          }
          return updateProperty((Property)item, jsonItem);
      }
docs: Updates the existing item based upon the supplied JSON content.
  
  @param item the node or property to be updated
  @param jsonItem the JSON of the item(s) to be updated
  @return the node that was updated; never null
  @throws JSONException if there is an error encoding the node
  @throws RepositoryException if any other error occurs