|
4 | 4 | import tools.jackson.core.JsonGenerator;
|
5 | 5 | import tools.jackson.core.JsonToken;
|
6 | 6 | import tools.jackson.core.type.WritableTypeId;
|
| 7 | + |
7 | 8 | import tools.jackson.databind.JavaType;
|
8 | 9 | import tools.jackson.databind.SerializationContext;
|
9 | 10 | import tools.jackson.databind.annotation.JacksonStdImpl;
|
10 |
| -import tools.jackson.databind.jsonFormatVisitors.JsonArrayFormatVisitor; |
11 |
| -import tools.jackson.databind.jsonFormatVisitors.JsonFormatTypes; |
12 | 11 | import tools.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper;
|
13 | 12 | import tools.jackson.databind.jsontype.TypeSerializer;
|
14 | 13 | import tools.jackson.databind.ser.std.StdSerializer;
|
@@ -66,15 +65,6 @@ public void serializeWithType(byte[] value, JsonGenerator g, SerializationContex
|
66 | 65 | @Override
|
67 | 66 | public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint)
|
68 | 67 | {
|
69 |
| - // 14-Mar-2016, tatu: while logically (and within JVM) binary, gets encoded as Base64 String, |
70 |
| - // let's try to indicate it is array of Bytes... difficult, thanks to JSON Schema's |
71 |
| - // lackluster listing of types |
72 |
| - // |
73 |
| - // TODO: for 2.8, make work either as String/base64, or array of numbers, |
74 |
| - // with a qualifier that can be used to determine it's byte[] |
75 |
| - JsonArrayFormatVisitor v2 = visitor.expectArrayFormat(typeHint); |
76 |
| - if (v2 != null) { |
77 |
| - v2.itemsFormat(JsonFormatTypes.INTEGER); |
78 |
| - } |
| 68 | + acceptJsonFormatVisitorForBinary(visitor, typeHint); |
79 | 69 | }
|
80 | 70 | }
|
0 commit comments