code: public void writeJson(JsonParser parser, JsonGenerator jgen) throws IOException {
      checkNotNull(parser, "JsonParser cannot be null for writeJson.");
      checkNotNull(jgen, "JsonGenerator cannot be null for writeJson.");
      JsonToken curToken = parser.nextToken();
      while (curToken != null) {
        curToken = processToken(curToken, parser, jgen);
      }
      jgen.flush();
    }
docs: Writes the json from the parser onto the generator, using the filters to only write the objects
  specified.
  
  @param parser JsonParser that is created from a Jackson utility (i.e. ObjectMapper)
  @param jgen JsonGenerator that is used for writing json onto an underlying stream
  @throws JsonGenerationException exception if Jackson throws an error while iterating through
  the JsonParser
  @throws IOException if en error occurs while Jackson is parsing or writing json