protected String toJSON ( ) { ObjectMapper mapper = new ObjectMapper ( ) ; try { String jsonINString = mapper . writeValueAsString ( notationContainer ) ; jsonINString = mapper . writerWithDefaultPrettyPrinter ( ) . writeValueAsString ( notationContainer ) ; return jsonINString ; } catch ( Exception e ) { e . printStackTrace ( ) ; } return null ; }
method to generate a JSON - Object from the NotationContainer