code: public static void exportTypeSystem(@NonNull Resource output) throws IOException {
        try (JsonWriter writer = new JsonWriter(output)) {
           writer.beginDocument(true);
           for (AnnotationType atv : AnnotationType.values()) {
              writer.beginObject();
              writer.property("name", atv.name());
              writer.property("type", atv.type());
              writer.property("parent", atv.getParent().name());
              writer.property("tagType", atv.getTagAttribute().name());
              writer.endObject();
           }
           for (AttributeType atv : AttributeType.values()) {
              writer.beginObject();
              writer.property("name", atv.name());
              writer.property("type", atv.type());
              writer.property("valueType", atv.getValueType());
              writer.endObject();
           }
           for (RelationType rtv : RelationType.values()) {
              writer.beginObject();
              writer.property("name", rtv.name());
              writer.property("type", rtv.type());
              writer.endObject();
           }
           writer.endDocument();
        }
  
     }
docs: Exports the currently loaded Hermes type system in JSON.
  
  @param output The resource to output the json representation of the type system.