Home
last modified time | relevance | path

Searched defs:gson (Results 1 – 25 of 124) sorted by relevance

12345

/external/gson/gson/src/test/java/com/google/gson/functional/
DNamingPolicyTest.java46 Gson gson = builder.setFieldNamingPolicy(FieldNamingPolicy.UPPER_CAMEL_CASE).create(); in testGsonWithNonDefaultFieldNamingPolicySerialization() local
53 Gson gson = builder.setFieldNamingPolicy(FieldNamingPolicy.UPPER_CAMEL_CASE).create(); in testGsonWithNonDefaultFieldNamingPolicyDeserialiation() local
60 Gson gson = builder.setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_DASHES).create(); in testGsonWithLowerCaseDashPolicySerialization() local
67 Gson gson = builder.setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_DOTS).create(); in testGsonWithLowerCaseDotPolicySerialization() local
74 Gson gson = builder.setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_DOTS).create(); in testGsonWithLowerCaseDotPolicyDeserialiation() local
81 Gson gson = builder.setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_DASHES).create(); in testGsonWithLowerCaseDashPolicyDeserialiation() local
88 Gson gson = builder.setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES) in testGsonWithLowerCaseUnderscorePolicySerialization() local
96 Gson gson = builder.setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES) in testGsonWithLowerCaseUnderscorePolicyDeserialiation() local
104 Gson gson = builder.create(); in testGsonWithSerializedNameFieldNamingPolicySerialization() local
111 Gson gson = builder.create(); in testGsonWithSerializedNameFieldNamingPolicyDeserialization() local
[all …]
DReflectionAccessFilterTest.java45 Gson gson = new GsonBuilder() in testBlockInaccessibleJava() local
80 Gson gson = new GsonBuilder() in testBlockInaccessibleJavaExtendingJdkClass() local
99 Gson gson = new GsonBuilder() in testBlockAllJava() local
118 Gson gson = new GsonBuilder() in testBlockAllJavaExtendingJdkClass() local
142 Gson gson = new GsonBuilder() in testBlockInaccessibleStaticField() local
179 Gson gson = new GsonBuilder() in testDelegation() local
225 Gson gson = new GsonBuilder() in testAllowForSupertype() local
268 Gson gson = new GsonBuilder() in testInaccessibleNoArgsConstructor() local
306 Gson gson = gsonBuilder.create(); in testClassWithoutNoArgsConstructor() local
353 Gson gson = new GsonBuilder() in testBlockAllPartial() local
[all …]
DTypeAdapterPrecedenceTest.java36 Gson gson = new GsonBuilder() in testNonstreamingFollowedByNonstreaming() local
47 Gson gson = new GsonBuilder() in testStreamingFollowedByStreaming() local
56 Gson gson = new GsonBuilder() in testSerializeNonstreamingTypeAdapterFollowedByStreamingTypeAdapter() local
66 Gson gson = new GsonBuilder() in testStreamingFollowedByNonstreaming() local
76 Gson gson = new GsonBuilder() in testStreamingHierarchicalFollowedByNonstreaming() local
86 Gson gson = new GsonBuilder() in testStreamingFollowedByNonstreamingHierarchical() local
96 Gson gson = new GsonBuilder() in testStreamingHierarchicalFollowedByNonstreamingHierarchical() local
106 Gson gson = new GsonBuilder() in testNonstreamingHierarchicalFollowedByNonstreaming() local
DNullObjectAndFieldTest.java52 Gson gson = gsonBuilder.create(); in testTopLevelNullObjectSerialization() local
61 Gson gson = gsonBuilder.create(); in testTopLevelNullObjectDeserialization() local
67 Gson gson = gsonBuilder.create(); in testExplicitSerializationOfNulls() local
75 Gson gson = gsonBuilder.create(); in testExplicitDeserializationOfNulls() local
81 Gson gson = gsonBuilder.create(); in testExplicitSerializationOfNullArrayMembers() local
91 Gson gson = gsonBuilder.serializeNulls().create(); in testNullWrappedPrimitiveMemberSerialization() local
101 Gson gson = gsonBuilder.create(); in testNullWrappedPrimitiveMemberDeserialization() local
108 Gson gson = gsonBuilder.create(); in testExplicitSerializationOfNullCollectionMembers() local
115 Gson gson = gsonBuilder.create(); in testExplicitSerializationOfNullStringMembers() local
123 Gson gson = gsonBuilder.create(); in testCustomSerializationOfNulls() local
[all …]
DToNumberPolicyFunctionalTest.java36 Gson gson = new Gson(); in testDefault() local
44 Gson gson = new GsonBuilder() in testAsDoubles() local
55 Gson gson = new GsonBuilder() in testAsLazilyParsedNumbers() local
66 Gson gson = new GsonBuilder() in testAsLongsOrDoubles() local
79 Gson gson = new GsonBuilder() in testAsBigDecimals() local
94 Gson gson = new GsonBuilder() in testAsListOfLongsOrDoubles() local
117 Gson gson = new GsonBuilder() in testCustomStrategiesCannotAffectConcreteDeclaredNumbers() local
DCustomTypeAdaptersTest.java56 Gson gson = builder.registerTypeAdapter( in testCustomSerializers() local
71 Gson gson = new GsonBuilder().registerTypeAdapter( in testCustomDeserializers() local
87 Gson gson = createGsonObjectWithFooTypeAdapter(); in disable_testCustomSerializersOfSelf() local
97 Gson gson = createGsonObjectWithFooTypeAdapter(); in disable_testCustomDeserializersOfSelf() local
108 Gson gson = new GsonBuilder().registerTypeAdapter( in testCustomNestedSerializers() local
120 Gson gson = new GsonBuilder().registerTypeAdapter( in testCustomNestedDeserializers() local
134 Gson gson = new GsonBuilder().registerTypeAdapter(Base.class, new JsonSerializer<Base> () { in testCustomTypeAdapterDoesNotAppliesToSubClasses() local
151 Gson gson = new GsonBuilder().registerTypeAdapter(Base.class, new JsonSerializer<Base> () { in testCustomTypeAdapterAppliesToSubClassesSerializedAsBaseClass() local
210 Gson gson = new GsonBuilder() in testCustomSerializerInvokedForPrimitives() local
222 Gson gson = new GsonBuilder() in testCustomDeserializerInvokedForPrimitives() local
[all …]
DVersioningTest.java49 Gson gson = gsonWithVersion(1.29); in testVersionedUntilSerialization() local
66 Gson gson = gsonWithVersion(1.29); in testVersionedUntilDeserialization() local
81 Gson gson = gsonWithVersion(1.0); in testVersionedClassesSerialization() local
89 Gson gson = gsonWithVersion(1.0); in testVersionedClassesDeserialization() local
102 Gson gson = gsonWithVersion(1.0); in testIgnoreLaterVersionClassSerialization() local
108 Gson gson = gsonWithVersion(1.0); in testIgnoreLaterVersionClassDeserialization() local
118 Gson gson = gsonWithVersion(1.0); in testVersionedGsonWithUnversionedClassesSerialization() local
125 Gson gson = gsonWithVersion(1.0); in testVersionedGsonWithUnversionedClassesDeserialization() local
138 Gson gson = gsonWithVersion(1.0); in testVersionedGsonMixingSinceAndUntilSerialization() local
159 Gson gson = gsonWithVersion(1.0); in testVersionedGsonMixingSinceAndUntilDeserialization() local
DExclusionStrategyFunctionalTest.java57 Gson gson = createGson(new MyExclusionStrategy(String.class), true); in testExclusionStrategySerialization() local
66 Gson gson = createGson(new MyExclusionStrategy(String.class), true); in testExclusionStrategySerializationDoesNotImpactDeserialization() local
74 Gson gson = createGson(new MyExclusionStrategy(String.class), false); in testExclusionStrategyDeserialization() local
89 Gson gson = createGson(new MyExclusionStrategy(String.class), false); in testExclusionStrategySerializationDoesNotImpactSerialization() local
101 Gson gson = createGson(new MyExclusionStrategy(String.class), false); in testExclusionStrategyWithMode() local
116 Gson gson = new GsonBuilder() in testExcludeTopLevelClassSerialization() local
123 Gson gson = new GsonBuilder() in testExcludeTopLevelClassSerializationDoesNotImpactDeserialization() local
134 Gson gson = new GsonBuilder() in testExcludeTopLevelClassDeserialization() local
143 Gson gson = new GsonBuilder() in testExcludeTopLevelClassDeserializationDoesNotImpactSerialization() local
DFieldNamingTest.java34 Gson gson = getGsonWithNamingPolicy(IDENTITY); in testIdentity() local
42 Gson gson = getGsonWithNamingPolicy(UPPER_CAMEL_CASE); in testUpperCamelCase() local
50 Gson gson = getGsonWithNamingPolicy(UPPER_CAMEL_CASE_WITH_SPACES); in testUpperCamelCaseWithSpaces() local
58 Gson gson = getGsonWithNamingPolicy(UPPER_CASE_WITH_UNDERSCORES); in testUpperCaseWithUnderscores() local
66 Gson gson = getGsonWithNamingPolicy(LOWER_CASE_WITH_UNDERSCORES); in testLowerCaseWithUnderscores() local
74 Gson gson = getGsonWithNamingPolicy(LOWER_CASE_WITH_DASHES); in testLowerCaseWithDashes() local
DSecurityTest.java45 Gson gson = gsonBuilder.generateNonExecutableJson().create(); in testNonExecutableJsonSerialization() local
52 Gson gson = gsonBuilder.create(); in testNonExecutableJsonDeserialization() local
58 Gson gson = gsonBuilder.generateNonExecutableJson().create(); in testJsonWithNonExectuableTokenSerialization() local
68 Gson gson = gsonBuilder.create(); in testJsonWithNonExectuableTokenWithRegularGsonDeserialization() local
80 Gson gson = gsonBuilder.generateNonExecutableJson().create(); in testJsonWithNonExectuableTokenWithConfiguredGsonDeserialization() local
DCustomSerializerTest.java46 Gson gson = new GsonBuilder() in testBaseClassSerializerInvokedForBaseClassFields() local
57 Gson gson = new GsonBuilder() in testSubClassSerializerInvokedForBaseClassFieldsHoldingSubClassInstances() local
68 Gson gson = new GsonBuilder() in testSubClassSerializerInvokedForBaseClassFieldsHoldingArrayOfSubClassInstances() local
82 Gson gson = new GsonBuilder() in testBaseClassSerializerInvokedForBaseClassFieldsHoldingSubClassInstances() local
92 Gson gson = new GsonBuilder() in testSerializerReturnsNull() local
DTypeAdapterRuntimeTypeWrapperTest.java44 Gson gson = new GsonBuilder() in testJsonSerializer() local
64 Gson gson = new GsonBuilder() in testJsonDeserializer_ReflectiveSerializerDelegate() local
79 Gson gson = new GsonBuilder() in testJsonDeserializer_CustomSerializerDelegate() local
105 Gson gson = new GsonBuilder() in testJsonDeserializer_ReflectiveTreeSerializerDelegate() local
122 Gson gson = new GsonBuilder() in testJsonDeserializer_JsonSerializerDelegate() local
147 Gson gson = new GsonBuilder() in testJsonDeserializer_SubclassBackwardCompatibility() local
DInstanceCreatorTest.java42 Gson gson = new GsonBuilder() in testInstanceCreatorReturnsBaseType() local
55 Gson gson = new GsonBuilder() in testInstanceCreatorReturnsSubTypeForTopLevelObject() local
73 Gson gson = new GsonBuilder() in testInstanceCreatorReturnsSubTypeForField() local
96 Gson gson = new GsonBuilder() in testInstanceCreatorForCollectionType() local
112 Gson gson = new GsonBuilder() in testInstanceCreatorForParametrizedType() local
DJsonAdapterAnnotationOnClassesTest.java45 Gson gson = new Gson(); in testJsonAdapterInvoked() local
63 Gson gson = new Gson(); in testJsonAdapterFactoryInvoked() local
79 Gson gson = new GsonBuilder() in testRegisteredAdapterOverridesJsonAdapter() local
96 Gson gson = new GsonBuilder() in testRegisteredSerializerOverridesJsonAdapter() local
115 Gson gson = new GsonBuilder() in testRegisteredDeserializerOverridesJsonAdapter() local
137 Gson gson = new Gson(); in testNullSafeObjectFromJson() local
166 @Override public <T> TypeAdapter<T> create(Gson gson, final TypeToken<T> type) { in create()
DMapAsArrayTypeAdapterTest.java33 Gson gson = new GsonBuilder() in testSerializeComplexMapWithTypeAdapter() local
57 Gson gson = new GsonBuilder() in disabled_testTwoTypesCollapseToOneSerialize() local
72 Gson gson = new GsonBuilder() in testTwoTypesCollapseToOneDeserialize() local
86 Gson gson = new GsonBuilder() in testMultipleEnableComplexKeyRegistrationHasNoEffect() local
100 Gson gson = new GsonBuilder().enableComplexMapKeySerialization().create(); in testMapWithTypeVariableSerialization() local
109 Gson gson = new GsonBuilder().enableComplexMapKeySerialization().create(); in testMapWithTypeVariableDeserialization() local
DJsonAdapterAnnotationOnFieldsTest.java39 Gson gson = new Gson(); in testClassAnnotationAdapterTakesPrecedenceOverDefault() local
47 Gson gson = new Gson(); in testClassAnnotationAdapterFactoryTakesPrecedenceOverDefault() local
55 Gson gson = new GsonBuilder() in testRegisteredTypeAdapterTakesPrecedenceOverClassAnnotationAdapter() local
65 Gson gson = new GsonBuilder() in testFieldAnnotationTakesPrecedenceOverRegisteredTypeAdapter() local
81 Gson gson = new Gson(); in testFieldAnnotationTakesPrecedenceOverClassAnnotation() local
122 @Override public <T> TypeAdapter<T> create(Gson gson, final TypeToken<T> type) { in create()
DDefaultTypeAdaptersTest.java67 private Gson gson; field in DefaultTypeAdaptersTest
189 public static void testNullSerializationAndDeserialization(Gson gson, Class<?> c) { in testNullSerializationAndDeserialization()
294 Gson gson = new Gson(); in testSetSerialization() local
305 Gson gson = new Gson(); in testBitSetSerialization() local
320 Gson gson = new Gson(); in testBitSetDeserialization() local
382 Gson gson = new GsonBuilder().create(); in testDefaultDateSerializationUsingBuilder() local
393 Gson gson = new GsonBuilder().create(); in testDefaultDateDeserializationUsingBuilder() local
401 Gson gson = new GsonBuilder().create(); in testDefaultCalendarSerialization() local
412 Gson gson = new GsonBuilder().create(); in testDefaultCalendarDeserialization() local
424 Gson gson = new GsonBuilder().create(); in testDefaultGregorianCalendarSerialization() local
[all …]
DCustomDeserializerTest.java43 private Gson gson; field in CustomDeserializerTest
115 Gson gson = new GsonBuilder().registerTypeAdapter(MyBase.class, new JsonDeserializer<MyBase>() { in testJsonTypeFieldBasedDeserialization() local
152 Gson gson = new GsonBuilder() in testCustomDeserializerReturnsNullForTopLevelObject() local
166 Gson gson = new GsonBuilder() in testCustomDeserializerReturnsNull() local
180 Gson gson = new GsonBuilder() in testCustomDeserializerReturnsNullForArrayElements() local
195 Gson gson = new GsonBuilder() in testCustomDeserializerReturnsNullForArrayElementsForArrayField() local
/external/gson/gson/src/test/java/com/google/gson/
DMixedStreamTest.java51 Gson gson = new Gson(); in testWriteMixedStreamed() local
66 Gson gson = new Gson(); in testReadMixedStreamed() local
78 Gson gson = new Gson(); in testReaderDoesNotMutateState() local
92 Gson gson = new Gson(); in testWriteDoesNotMutateState() local
110 Gson gson = new Gson(); in testReadInvalidState() local
122 Gson gson = new Gson(); in testReadClosed() local
133 Gson gson = new Gson(); in testWriteInvalidState() local
144 Gson gson = new Gson(); in testWriteClosed() local
157 Gson gson = new Gson(); in testWriteNulls() local
170 Gson gson = new Gson(); in testReadNulls() local
DGsonBuilderTest.java50 Gson gson = builder.create(); in testCreatingMoreThanOnce() local
73 Gson gson = gsonBuilder.create(); in testModificationAfterCreate() local
105 private static void assertDefaultGson(Gson gson) { in assertDefaultGson()
119 private static void assertCustomGson(Gson gson) { in assertCustomGson()
148 Gson gson = new GsonBuilder() in testExcludeFieldsWithModifiers() local
164 Gson gson = new GsonBuilder() in testTransientFieldExclusion() local
191 Gson gson = new GsonBuilder() in testDisableJdkUnsafe() local
DLongSerializationPolicyTest.java40 Gson gson = new GsonBuilder() in testDefaultLongSerializationIntegration() local
51 Gson gson = new GsonBuilder() in testDefaultLongSerializationNull() local
68 Gson gson = new GsonBuilder() in testStringLongSerializationIntegration() local
79 Gson gson = new GsonBuilder() in testStringLongSerializationNull() local
DOverrideCoreTypeAdaptersTest.java49 Gson gson = new GsonBuilder() in testOverrideWrapperBooleanAdapter() local
60 Gson gson = new GsonBuilder() in testOverridePrimitiveBooleanAdapter() local
71 Gson gson = new GsonBuilder() in testOverrideStringAdapter() local
DGsonTest.java58 Gson gson = new Gson(CUSTOM_EXCLUDER, CUSTOM_FIELD_NAMING_STRATEGY, in testOverridesDefaultExcluder() local
96 Gson gson = new Gson(); in testGetAdapter_Null() local
120 Gson gson = new GsonBuilder() in testGetAdapter_Concurrency() local
230 Gson gson = new Gson(); in testDefaultGsonNewBuilderModification() local
262 private static void assertDefaultGson(Gson gson) { in assertDefaultGson()
282 Gson gson = new GsonBuilder() in testNewBuilderModification() local
345 private static void assertCustomGson(Gson gson) { in assertCustomGson()
/external/gson/extras/src/test/java/com/google/gson/typeadapters/
DRuntimeTypeAdapterFactoryTest.java31 Gson gson = new GsonBuilder() in testRuntimeTypeAdapter() local
52 Gson gson = new GsonBuilder() in testRuntimeTypeAdapterRecognizeSubtypes() local
69 Gson gson = new GsonBuilder() in testRuntimeTypeIsBaseType() local
142 Gson gson = new GsonBuilder() in testDeserializeMissingTypeField() local
155 Gson gson = new GsonBuilder() in testDeserializeMissingSubtype() local
168 Gson gson = new GsonBuilder() in testSerializeMissingSubtype() local
181 Gson gson = new GsonBuilder() in testSerializeCollidingTypeFieldName() local
195 Gson gson = new GsonBuilder() in testSerializeWrappedNullValue() local
/external/gson/extras/src/test/java/com/google/gson/graph/
DGraphAdapterBuilderTest.java47 Gson gson = gsonBuilder.create(); in testSerialization() local
65 Gson gson = gsonBuilder.create(); in testDeserialization() local
84 Gson gson = gsonBuilder.create(); in testDeserializationDirectSelfReference() local
105 Gson gson = gsonBuilder.create(); in testSerializeListOfLists() local
121 Gson gson = gsonBuilder.create(); in testDeserializeListOfLists() local
140 Gson gson = gsonBuilder.create(); in testSerializationWithMultipleTypes() local
155 Gson gson = gsonBuilder.create(); in testDeserializationWithMultipleTypes() local

12345