code: public void compose(JsonCreator writer, Resource resource) throws IOException {
      json = writer;
      composeResource(resource);
    }
docs: Compose a resource using a pre-existing JsonWriter
  @throws IOException