@Test void testEmptyBytes() throws Exception { new ByteArrayToHexSerializer().serialize(new byte[0], jsonGenerator, null); verify(jsonGenerator).writeString("\\x"); }
@Override public void serialize(byte[] value, JsonGenerator gen, SerializerProvider serializers) throws IOException { if (value != null) { gen.writeString("\\x" + Hex.encodeHexString(value)); } }
ByteArrayToHexSerializer extends JsonSerializer<byte[]> { @Override public void serialize(byte[] value, JsonGenerator gen, SerializerProvider serializers) throws IOException { if (value != null) { gen.writeString("\\x" + Hex.encodeHexString(value)); } } }
ByteArrayToHexSerializer extends JsonSerializer<byte[]> { @Override public void serialize(byte[] value, JsonGenerator gen, SerializerProvider serializers) throws IOException { if (value != null) { gen.writeString("\\x" + Hex.encodeHexString(value)); } }  }
ByteArrayToHexSerializer extends JsonSerializer<byte[]> { @Override public void serialize(byte[] value, JsonGenerator gen, SerializerProvider serializers) throws IOException { if (value != null) { gen.writeString("\\x" + Hex.encodeHexString(value)); } }  @Override void serialize(byte[] value, JsonGenerator gen, SerializerProvider serializers); }
ByteArrayToHexSerializer extends JsonSerializer<byte[]> { @Override public void serialize(byte[] value, JsonGenerator gen, SerializerProvider serializers) throws IOException { if (value != null) { gen.writeString("\\x" + Hex.encodeHexString(value)); } }  @Override void serialize(byte[] value, JsonGenerator gen, SerializerProvider serializers);  }