public void write ( Object obj ) { traceReferences ( obj ) ; objVisited . clear ( ) ; try { writeImpl ( obj , true ) ; } catch ( Exception e ) { throw new JsonIoException ( "Error writing object to JSON:" , e ) ; } flush ( ) ; objVisited . clear ( ) ; objsReferenced . clear ( ) ; }
Write the passed in Java object in JSON format .