@Test void writeValueAsBytes_with_invalid_dto_test() { ConverterTestInvalidDto converterTestInvalidDto = new ConverterTestInvalidDto(); converterTestInvalidDto.setValue(new Object()); assertThrows(UncheckedIOException.class, () -> jsonConverter.writeValueAsBytes(converterTestInvalidDto) ); }
public byte[] writeValueAsBytes(Object value) { try { return jsonMapper.writeValueAsBytes(value); } catch (JsonProcessingException e) { throw new UncheckedIOException(e); } }
JsonConverter implements Serializable { public byte[] writeValueAsBytes(Object value) { try { return jsonMapper.writeValueAsBytes(value); } catch (JsonProcessingException e) { throw new UncheckedIOException(e); } } }
JsonConverter implements Serializable { public byte[] writeValueAsBytes(Object value) { try { return jsonMapper.writeValueAsBytes(value); } catch (JsonProcessingException e) { throw new UncheckedIOException(e); } } JsonConverter(ObjectMapper jsonMapper); }
JsonConverter implements Serializable { public byte[] writeValueAsBytes(Object value) { try { return jsonMapper.writeValueAsBytes(value); } catch (JsonProcessingException e) { throw new UncheckedIOException(e); } } JsonConverter(ObjectMapper jsonMapper); T readValue(String src, Class<T> valueType); T readValue(InputStream src, Class<T> valueType); T readValue(String src, TypeReference<T> valueTypeRef); T readValue(InputStream src, TypeReference<T> valueTypeRef); byte[] writeValueAsBytes(Object value); String writeValueAsString(Object value); }
JsonConverter implements Serializable { public byte[] writeValueAsBytes(Object value) { try { return jsonMapper.writeValueAsBytes(value); } catch (JsonProcessingException e) { throw new UncheckedIOException(e); } } JsonConverter(ObjectMapper jsonMapper); T readValue(String src, Class<T> valueType); T readValue(InputStream src, Class<T> valueType); T readValue(String src, TypeReference<T> valueTypeRef); T readValue(InputStream src, TypeReference<T> valueTypeRef); byte[] writeValueAsBytes(Object value); String writeValueAsString(Object value);  }