code: public void closeJsonStream() throws IOException {
  		if (generator == null) {
  			return;
  		}
  
  		while (!stack.isEmpty()) {
  			writeEndComponent();
  		}
  
  		if (wrapInArray) {
  			generator.writeEndArray();
  		}
  
  		if (closeGenerator) {
  			generator.close();
  		}
  	}
docs: Finishes writing the JSON document so that it is syntactically correct.
  No more data can be written once this method is called.
  @throws IOException if there's a problem closing the stream