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