public static byte [ ] asBytesUnchecked ( final Object value ) { try { return OBJECT_MAPPER . writeValueAsBytes ( value ) ; } catch ( JsonProcessingException e ) { throw new RuntimeException ( e ) ; } }
Serialize an object to json . Use when object is expected to be json serializable .