code: @Override
      public JSONObject toJSONObject()
      {
          final JSONObject object = new JSONObject();
  
          object.put("type", new JSONString(getShapeType().getValue()));
  
          if (hasMetaData())
          {
              final MetaData meta = getMetaData();
  
              if (false == meta.isEmpty())
              {
                  object.put("meta", new JSONObject(meta.getJSO()));
              }
          }
          object.put("attributes", new JSONObject(getAttributes().getJSO()));
  
          return object;
      }
docs: Serializes this shape as a {@link JSONObject}
  
  @return JSONObject