@Test void writeValueAsBytes_test() { ConverterTestDto converterTestDto = new ConverterTestDto(); converterTestDto.setValue("dummy"); byte[] bytes = jsonConverter.writeValueAsBytes(converterTestDto); assertThat(Base64UrlUtil.encodeToString(bytes)).isEqualTo("eyJ2YWx1ZSI6ImR1bW15In0"); }
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);  }