Home
last modified time | relevance | path

Searched refs:JsonFormat (Results 1 – 25 of 93) sorted by relevance

1234

/external/jackson-annotations/src/test/java/com/fasterxml/jackson/annotation/
DFormatTest.java3 import com.fasterxml.jackson.annotation.JsonFormat.Feature;
4 import com.fasterxml.jackson.annotation.JsonFormat.Shape;
12 private final JsonFormat.Value EMPTY = JsonFormat.Value.empty();
14 @JsonFormat(shape=JsonFormat.Shape.BOOLEAN, pattern="xyz", timezone="bogus")
18 JsonFormat.Value empty = JsonFormat.Value.empty(); in testEmptyInstanceDefaults()
33 assertTrue(new JsonFormat.Value().equals(new JsonFormat.Value())); in testEquality()
35 JsonFormat.Value v1 = JsonFormat.Value.forShape(Shape.BOOLEAN); in testEquality()
36 JsonFormat.Value v2 = JsonFormat.Value.forShape(Shape.BOOLEAN); in testEquality()
37 JsonFormat.Value v3 = JsonFormat.Value.forShape(Shape.SCALAR); in testEquality()
59 JsonFormat.Value.forShape(JsonFormat.Shape.STRING).toString()); in testToString()
[all …]
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/struct/
DFormatFeatureUnwrapSingleTest.java12 import com.fasterxml.jackson.annotation.JsonFormat;
32 @JsonFormat(with={ JsonFormat.Feature.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED })
37 @JsonFormat(without={ JsonFormat.Feature.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED })
44 @JsonFormat(with={ JsonFormat.Feature.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED })
49 @JsonFormat(with={ JsonFormat.Feature.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED })
54 @JsonFormat(with={ JsonFormat.Feature.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED })
59 @JsonFormat(with={ JsonFormat.Feature.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED })
64 @JsonFormat(with={ JsonFormat.Feature.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED })
69 @JsonFormat(with={ JsonFormat.Feature.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED })
74 @JsonFormat(with={ JsonFormat.Feature.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED })
[all …]
DFormatFeatureAcceptSingleTest.java6 import com.fasterxml.jackson.annotation.JsonFormat;
20 @JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
25 @JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
30 @JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
35 @JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
40 @JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
45 @JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
50 @JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
55 @JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
60 @JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
[all …]
DTestPOJOAsArray.java7 import com.fasterxml.jackson.annotation.JsonFormat.Shape;
18 @JsonFormat(shape=JsonFormat.Shape.ARRAY)
56 @JsonFormat(shape=JsonFormat.Shape.ARRAY)
77 public JsonFormat.Value findFormat(Annotated a) { in findFormat()
78 return new JsonFormat.Value().withShape(JsonFormat.Shape.ARRAY); in findFormat()
92 @JsonFormat(shape=Shape.ARRAY)
98 @JsonFormat(shape=Shape.ARRAY)
104 @JsonFormat(shape=JsonFormat.Shape.ARRAY)
117 @JsonFormat(shape=JsonFormat.Shape.ARRAY)
256 .setFormat(JsonFormat.Value.forShape(JsonFormat.Shape.ARRAY)); in testWithConfigOverrides()
DTestPOJOAsArrayAdvanced.java9 @JsonFormat(shape=JsonFormat.Shape.ARRAY)
27 @JsonFormat(shape=JsonFormat.Shape.ARRAY)
48 @JsonFormat(shape=JsonFormat.Shape.ARRAY)
59 @JsonFormat(shape=JsonFormat.Shape.ARRAY)
DPojoAsArray646Test.java11 @JsonFormat(shape = JsonFormat.Shape.ARRAY)
26 @JsonFormat(shape = JsonFormat.Shape.ARRAY)
30 @JsonFormat(shape = JsonFormat.Shape.ARRAY)
DTestPOJOAsArrayWithBuilder.java20 @JsonFormat(shape=JsonFormat.Shape.ARRAY)
32 @JsonFormat(shape=JsonFormat.Shape.ARRAY)
61 @JsonFormat(shape=JsonFormat.Shape.ARRAY)
74 @JsonFormat(shape=JsonFormat.Shape.ARRAY)
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/format/
DEnumFormatShapeTest.java7 import com.fasterxml.jackson.annotation.JsonFormat.Shape;
18 @JsonFormat(shape=JsonFormat.Shape.OBJECT)
37 @JsonFormat(shape=Shape.NUMBER)
41 @JsonFormat(shape=JsonFormat.Shape.ARRAY) // alias for 'number', as of 2.5
50 @JsonFormat(shape=Shape.STRING)
56 @JsonFormat(shape=Shape.NUMBER)
61 @JsonFormat(shape = JsonFormat.Shape.NUMBER_INT)
77 @JsonFormat(shape = JsonFormat.Shape.OBJECT)
85 @JsonFormat(shape = JsonFormat.Shape.OBJECT)
DBooleanFormatTest.java3 import com.fasterxml.jackson.annotation.JsonFormat;
14 @JsonFormat(shape=JsonFormat.Shape.NUMBER)
17 @JsonFormat(shape=JsonFormat.Shape.NUMBER)
61 .setFormat(JsonFormat.Value.forShape(JsonFormat.Shape.NUMBER)); in testShapeViaDefaults()
DMapFormatShapeTest.java8 import com.fasterxml.jackson.annotation.JsonFormat;
23 @JsonFormat(shape=JsonFormat.Shape.OBJECT)
32 @JsonFormat(shape=JsonFormat.Shape.OBJECT)
53 @JsonFormat(shape=JsonFormat.Shape.NATURAL)
63 @JsonFormat(shape = JsonFormat.Shape.OBJECT)
DMapEntryFormatTest.java6 import com.fasterxml.jackson.annotation.JsonFormat;
14 @JsonFormat(shape=JsonFormat.Shape.NATURAL)
25 @JsonFormat(shape=JsonFormat.Shape.OBJECT)
174 .setFormat(JsonFormat.Value.forShape(JsonFormat.Shape.OBJECT)); in testDefaultShapeOverride()
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/ser/jdk/
DNumberSerTest.java6 import com.fasterxml.jackson.annotation.JsonFormat;
42 @JsonFormat(shape=JsonFormat.Shape.STRING)
48 @JsonFormat(shape=JsonFormat.Shape.STRING)
53 @JsonFormat(shape=JsonFormat.Shape.STRING)
58 @JsonFormat(shape=JsonFormat.Shape.STRING)
63 @JsonFormat(shape=JsonFormat.Shape.STRING)
135 .setFormat(JsonFormat.Value.forShape(JsonFormat.Shape.STRING)); in testConfigOverridesForNumbers()
137 .setFormat(JsonFormat.Value.forShape(JsonFormat.Shape.STRING)); in testConfigOverridesForNumbers()
139 .setFormat(JsonFormat.Value.forShape(JsonFormat.Shape.STRING)); in testConfigOverridesForNumbers()
DBigDecimalAsString2519Test.java6 import com.fasterxml.jackson.annotation.JsonFormat;
25 .setFormat(JsonFormat.Value.forShape(JsonFormat.Shape.STRING)); in testBigDecimalAsString2519Typed()
36 .setFormat(JsonFormat.Value.forShape(JsonFormat.Shape.STRING)); in testBigDecimalAsString2519Untyped()
DDateSerializationTest.java16 import com.fasterxml.jackson.annotation.JsonFormat;
37 @JsonFormat(shape=JsonFormat.Shape.NUMBER)
43 @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
49 @JsonFormat(shape=JsonFormat.Shape.STRING)
55 @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd,HH:00", timezone="CET")
61 @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
75 @JsonFormat
81 @JsonFormat(pattern="yyyy-MM-dd")
87 @JsonFormat(locale = "fr")
93 @JsonFormat(timezone="CET")
DSqlDateSerializationTest.java21 @JsonFormat(shape=JsonFormat.Shape.NUMBER)
28 @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy.MM.dd")
104 .setFormat(JsonFormat.Value.forPattern("yyyy+MM+dd")); in testSqlDateConfigOverride()
/external/protobuf/java/util/src/test/java/com/google/protobuf/util/
DJsonFormatTest.java52 import com.google.protobuf.util.JsonFormat.TypeRegistry;
147 JsonFormat.Printer printer = JsonFormat.printer().usingTypeRegistry(registry); in assertRoundTripEquals()
148 JsonFormat.Parser parser = JsonFormat.parser().usingTypeRegistry(registry); in assertRoundTripEquals()
156 return JsonFormat.printer().print(message); in toJsonString()
159 return JsonFormat.printer().omittingInsignificantWhitespace().print(message); in toCompactJsonString()
162 return JsonFormat.printer().sortingMapKeys().print(message); in toSortedJsonString()
166 JsonFormat.parser().merge(json, builder); in mergeFromJson()
171 JsonFormat.parser().ignoringUnknownFields().merge(json, builder); in mergeFromJsonIgnoringUnknownFields()
865 JsonFormat.TypeRegistry registry = in testAnyFields()
866 JsonFormat.TypeRegistry.newBuilder().add(TestAllTypes.getDescriptor()).build(); in testAnyFields()
[all …]
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/misc/
DCaseInsensitiveDeserTest.java6 import com.fasterxml.jackson.annotation.JsonFormat;
37 @JsonFormat(with={ JsonFormat.Feature.ACCEPT_CASE_INSENSITIVE_PROPERTIES })
98 @JsonFormat(with={ JsonFormat.Feature.ACCEPT_CASE_INSENSITIVE_PROPERTIES })
111 @JsonFormat(without={ JsonFormat.Feature.ACCEPT_CASE_INSENSITIVE_PROPERTIES })
184 .setFormat(JsonFormat.Value.empty() in testCaseInsensitiveViaConfigOverride()
185 .withFeature(JsonFormat.Feature.ACCEPT_CASE_INSENSITIVE_PROPERTIES)); in testCaseInsensitiveViaConfigOverride()
/external/jackson-databind/src/main/java/com/fasterxml/jackson/databind/
DBeanProperty.java7 import com.fasterxml.jackson.annotation.JsonFormat;
8 import com.fasterxml.jackson.annotation.JsonFormat.Value;
39 public final static JsonFormat.Value EMPTY_FORMAT = new JsonFormat.Value();
148 public JsonFormat.Value findFormatOverrides(AnnotationIntrospector intr); in findFormatOverrides()
156 public JsonFormat.Value findPropertyFormat(MapperConfig<?> config, Class<?> baseType); in findPropertyFormat()
276 public JsonFormat.Value findFormatOverrides(AnnotationIntrospector intr) { in findFormatOverrides()
278 JsonFormat.Value v = intr.findFormat(_member); in findFormatOverrides()
287 public JsonFormat.Value findPropertyFormat(MapperConfig<?> config, Class<?> baseType) { in findPropertyFormat()
288 JsonFormat.Value v0 = config.getDefaultPropertyFormat(baseType); in findPropertyFormat()
293 JsonFormat.Value v = intr.findFormat(_member); in findPropertyFormat()
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/testutil/
DMediaItem.java5 import com.fasterxml.jackson.annotation.JsonFormat;
8 @JsonFormat(shape=JsonFormat.Shape.ARRAY)
44 @JsonFormat(shape=JsonFormat.Shape.ARRAY)
77 @JsonFormat(shape=JsonFormat.Shape.ARRAY)
/external/jackson-databind/src/test/java/perf/
DMediaItem.java5 import com.fasterxml.jackson.annotation.JsonFormat;
8 @JsonFormat(shape=JsonFormat.Shape.ARRAY)
44 @JsonFormat(shape=JsonFormat.Shape.ARRAY)
77 @JsonFormat(shape=JsonFormat.Shape.ARRAY)
DRecordAsArray.java3 import com.fasterxml.jackson.annotation.JsonFormat;
5 @JsonFormat(shape=JsonFormat.Shape.ARRAY)
/external/grpc-grpc-java/examples/src/main/java/io/grpc/examples/advanced/
DJsonMarshaller.java22 import com.google.protobuf.util.JsonFormat;
23 import com.google.protobuf.util.JsonFormat.Parser;
24 import com.google.protobuf.util.JsonFormat.Printer;
48 final Parser parser = JsonFormat.parser(); in jsonMarshaller()
49 final Printer printer = JsonFormat.printer(); in jsonMarshaller()
/external/jackson-databind/src/main/java/com/fasterxml/jackson/databind/introspect/
DConcreteBeanPropertyBase.java6 import com.fasterxml.jackson.annotation.JsonFormat;
56 public final JsonFormat.Value findFormatOverrides(AnnotationIntrospector intr) { in findFormatOverrides()
57 JsonFormat.Value f = null; in findFormatOverrides()
71 public JsonFormat.Value findPropertyFormat(MapperConfig<?> config, Class<?> baseType) in findPropertyFormat()
73 JsonFormat.Value v1 = config.getDefaultPropertyFormat(baseType); in findPropertyFormat()
74 JsonFormat.Value v2 = null; in findPropertyFormat()
/external/jackson-databind/src/main/java/com/fasterxml/jackson/databind/ser/std/
DEnumSerializer.java7 import com.fasterxml.jackson.annotation.JsonFormat;
8 import com.fasterxml.jackson.annotation.JsonFormat.Shape;
71 BeanDescription beanDesc, JsonFormat.Value format) in construct()
91 JsonFormat.Value format = findFormatOverrides(serializers, in createContextual()
207 JsonFormat.Value format, boolean fromClass, in _isShapeWrittenUsingIndex()
210 JsonFormat.Shape shape = (format == null) ? null : format.getShape(); in _isShapeWrittenUsingIndex()
/external/jackson-annotations/src/main/java/com/fasterxml/jackson/annotation/
DJsonFormat.java52 public @interface JsonFormat annotation
126 public JsonFormat.Feature[] with() default { }; in with()
135 public JsonFormat.Feature[] without() default { }; in without()
337 public static Features construct(JsonFormat f) { in construct()
434 implements JacksonAnnotationValue<JsonFormat>, // since 2.6
464 public Value(JsonFormat ann) { in Value()
568 public final static Value from(JsonFormat ann) { in from()
689 public Value withFeature(JsonFormat.Feature f) { in withFeature()
699 public Value withoutFeature(JsonFormat.Feature f) { in withoutFeature()
707 public Class<JsonFormat> valueFor() { in valueFor()
[all …]

1234