code: public void toJson(JsonElement jsonElement, Appendable writer) throws JsonIOException {
      try {
        JsonWriter jsonWriter = newJsonWriter(Streams.writerForAppendable(writer));
        toJson(jsonElement, jsonWriter);
      } catch (IOException e) {
        throw new RuntimeException(e);
      }
    }
docs: Writes out the equivalent JSON for a tree of {@link JsonElement}s.
  
  @param jsonElement root of a tree of {@link JsonElement}s
  @param writer Writer to which the Json representation needs to be written
  @throws JsonIOException if there was a problem writing to the writer
  @since 1.4