public static < P extends ParaObject > String toJSON ( P obj ) { if ( obj == null ) { return "{}" ; } try { return getJsonWriter ( ) . writeValueAsString ( obj ) ; } catch ( Exception e ) { logger . error ( null , e ) ; } return "{}" ; }
Converts a domain object to JSON .