@Test void writeValueAsString_test() { ConverterTestDto converterTestDto = new ConverterTestDto(); converterTestDto.setValue("dummy"); String str = jsonConverter.writeValueAsString(converterTestDto); assertThat(str).isEqualTo("{\"value\":\"dummy\"}"); }
public String writeValueAsString(Object value) { try { return jsonMapper.writeValueAsString(value); } catch (JsonProcessingException e) { throw new UncheckedIOException(e); } }
JsonConverter implements Serializable { public String writeValueAsString(Object value) { try { return jsonMapper.writeValueAsString(value); } catch (JsonProcessingException e) { throw new UncheckedIOException(e); } } }
JsonConverter implements Serializable { public String writeValueAsString(Object value) { try { return jsonMapper.writeValueAsString(value); } catch (JsonProcessingException e) { throw new UncheckedIOException(e); } } JsonConverter(ObjectMapper jsonMapper); }
JsonConverter implements Serializable { public String writeValueAsString(Object value) { try { return jsonMapper.writeValueAsString(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 String writeValueAsString(Object value) { try { return jsonMapper.writeValueAsString(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);  }