code: public JSONObject toJSON() {
          try {
              return new JSONObject(properties).putOpt("name", getName());
          } catch (JSONException e) {
              e.printStackTrace();
              Log.e(TAG, e, "toJSON()");
              throw new RuntimeAssertion("NodeEntry.toJSON() failed for '%s'", this);
          }
      }
docs: Converts the node to JSON
  @return JSON object