├── .gitignore ├── .travis.yml ├── .wiki └── quickstart.md ├── LICENSE ├── README.md ├── RELEASE-NOTES.MD ├── androidjson-to-easyjson ├── pom.xml └── src │ └── main │ └── java │ └── org │ └── json │ ├── JSON.java │ ├── JSONArray.java │ ├── JSONException.java │ ├── JSONObject.java │ ├── JSONStringer.java │ ├── JSONTokener.java │ ├── JsonMapper.java │ └── JsonTokeners.java ├── boonjson-to-easyjson ├── pom.xml └── src │ ├── main │ └── java │ │ └── io │ │ └── advantageous │ │ └── boon │ │ └── json │ │ ├── JsonException.java │ │ ├── JsonFactory.java │ │ ├── JsonMappingParser.java │ │ ├── JsonParser.java │ │ ├── JsonParserAndMapper.java │ │ ├── JsonParserEvents.java │ │ ├── JsonParserFactory.java │ │ ├── JsonSerializer.java │ │ ├── JsonSerializerFactory.java │ │ ├── ObjectMapper.java │ │ ├── ObjectSerializationData.java │ │ ├── annotations │ │ ├── Expose.java │ │ ├── JsonIgnore.java │ │ ├── JsonIgnoreProperties.java │ │ ├── JsonInclude.java │ │ ├── JsonProperty.java │ │ ├── JsonViews.java │ │ └── SerializedName.java │ │ ├── implementation │ │ ├── BaseJsonParser.java │ │ ├── BaseJsonParserAndMapper.java │ │ ├── JsonAsciiParser.java │ │ ├── JsonBaseByteArrayParser.java │ │ ├── JsonFastParser.java │ │ ├── JsonParserCharArray.java │ │ ├── JsonParserLax.java │ │ ├── JsonParserUsingCharacterSource.java │ │ ├── JsonStringDecoder.java │ │ ├── JsonUTF8Parser.java │ │ └── ObjectMapperImpl.java │ │ └── serializers │ │ ├── ArraySerializer.java │ │ ├── CollectionSerializer.java │ │ ├── CustomFieldSerializer.java │ │ ├── CustomObjectSerializer.java │ │ ├── DateSerializer.java │ │ ├── FieldFilter.java │ │ ├── FieldSerializer.java │ │ ├── InstanceSerializer.java │ │ ├── JsonSerializerInternal.java │ │ ├── MapSerializer.java │ │ ├── ObjectSerializer.java │ │ ├── StringSerializer.java │ │ ├── UnknownSerializer.java │ │ └── impl │ │ ├── AbstractCustomFieldSerializer.java │ │ ├── AbstractCustomObjectSerializer.java │ │ ├── BasicObjectSerializerImpl.java │ │ ├── CollectionSerializerImpl.java │ │ ├── CustomObjectSerializerImpl.java │ │ ├── DateSerializerImpl.java │ │ ├── FieldSerializerImpl.java │ │ ├── FieldSerializerUseAnnotationsImpl.java │ │ ├── InstanceSerializerImpl.java │ │ ├── JsonDateSerializer.java │ │ ├── JsonSerializerImpl.java │ │ ├── JsonSimpleSerializerImpl.java │ │ ├── MapSerializerImpl.java │ │ ├── SerializeUtils.java │ │ ├── StringSerializerImpl.java │ │ └── UnknownSerializerImpl.java │ └── test │ └── java │ └── com │ └── jn │ └── easyjson │ └── boonjson │ └── test │ └── BoonTests.java ├── checkstyle.xml ├── easyjson-antlr4json ├── .gitignore ├── pom.xml └── src │ ├── generated │ └── java │ │ └── com │ │ └── jn │ │ └── easyjson │ │ └── antlr4json │ │ └── generated │ │ ├── Json.tokens │ │ ├── JsonBaseListener.java │ │ ├── JsonLexer.java │ │ ├── JsonLexer.tokens │ │ ├── JsonListener.java │ │ └── JsonParser.java │ ├── main │ ├── java │ │ └── com │ │ │ └── jn │ │ │ └── easyjson │ │ │ └── antlr4json │ │ │ ├── Antlr4JsonHandlerAdapter.java │ │ │ ├── Antlr4JsonListenerImpl.java │ │ │ └── Antlr4Jsons.java │ └── resources │ │ └── grammar │ │ └── Json.g4 │ └── test │ ├── java │ └── com │ │ └── jn │ │ └── easyjson │ │ └── antlr4json │ │ └── tests │ │ └── JsonParseTests.java │ └── resources │ ├── example001.json │ ├── example002.json │ └── example003.json ├── easyjson-core ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── jn │ │ └── easyjson │ │ └── core │ │ ├── JSON.java │ │ ├── JSONBuilder.java │ │ ├── JSONBuilderAware.java │ │ ├── JSONBuilderCustomizer.java │ │ ├── JSONBuilderProvider.java │ │ ├── JSONFactory.java │ │ ├── JsonCustomizer.java │ │ ├── JsonException.java │ │ ├── JsonHandler.java │ │ ├── JsonHandlerAdapter.java │ │ ├── JsonTreeNode.java │ │ ├── annotation │ │ ├── DependOn.java │ │ └── Ignore.java │ │ ├── bean │ │ └── propertynaming │ │ │ ├── BeanPropertyNamingPolicy.java │ │ │ ├── BeanPropertyNamingPolicyRegistry.java │ │ │ ├── IdentityPropertyNamingPolicy.java │ │ │ ├── ProxyDialectNamingPolicy.java │ │ │ └── UpperCamelCasePropertyNamingPolicy.java │ │ ├── codec │ │ └── dialect │ │ │ ├── AnnotatedElementCodecConfigurationParser.java │ │ │ ├── BeanClassAnnotatedCodecConfigurationParser.java │ │ │ ├── BeanPropertyAnnotatedCodecConfigurationParser.java │ │ │ ├── BeanPropertyFinder.java │ │ │ ├── BeanPropertyId.java │ │ │ ├── BeanPropertyIdGenerator.java │ │ │ ├── BeanPropertyIdParser.java │ │ │ ├── ClassCodecConfiguration.java │ │ │ ├── ClassLoaderCodecConfigurationLoader.java │ │ │ ├── ClassLoaderCodecConfigurationRepository.java │ │ │ ├── ClassLoaderCodecConfigurationRepositoryBuilder.java │ │ │ ├── CodecConfiguration.java │ │ │ ├── CodecConfigurationRepository.java │ │ │ ├── CodecConfigurationRepositoryService.java │ │ │ ├── DialectIdentify.java │ │ │ ├── FakeBootstrapClassLoader.java │ │ │ ├── PropertyCodecConfiguration.java │ │ │ ├── PropertyCodecConfigurationMerger.java │ │ │ ├── PropertyConfigurationSourceType.java │ │ │ ├── PropertyIdGenerator.java │ │ │ └── package-info.java │ │ ├── exclusion │ │ ├── Exclusion.java │ │ ├── ExclusionConfiguration.java │ │ ├── FieldNamesExclusion.java │ │ ├── IgnoreAnnotationExclusion.java │ │ └── UnderlineStartedExclusion.java │ │ ├── factory │ │ ├── JsonFactoryProperties.java │ │ ├── JsonFactorys.java │ │ ├── JsonScope.java │ │ ├── PrototypeJSONFactory.java │ │ └── SingletonJSONFactory.java │ │ ├── node │ │ ├── JsonArrayNode.java │ │ ├── JsonNodeNavigator.java │ │ ├── JsonNullNode.java │ │ ├── JsonObjectNode.java │ │ ├── JsonPrimitiveNode.java │ │ ├── JsonTreeNodes.java │ │ ├── ToJsonTreeNodeMapper.java │ │ └── ToXxxJsonMapper.java │ │ ├── tree │ │ ├── JsonIOException.java │ │ ├── JsonParseException.java │ │ ├── JsonReaderInternalAccess.java │ │ ├── JsonSyntaxException.java │ │ ├── JsonTreeDeserializer.java │ │ ├── JsonTreeSerializer.java │ │ ├── JsonTreeSerializerBuilder.java │ │ ├── Streams.java │ │ ├── bind │ │ │ ├── JsonTreeReader.java │ │ │ ├── JsonTreeWriter.java │ │ │ ├── TypeAdapter.java │ │ │ ├── TypeAdapters.java │ │ │ └── TypeToken.java │ │ └── stream │ │ │ ├── JsonReader.java │ │ │ ├── JsonScope.java │ │ │ ├── JsonToken.java │ │ │ ├── JsonWriter.java │ │ │ └── MalformedJsonException.java │ │ └── util │ │ ├── JSONs.java │ │ └── LazilyParsedNumber.java │ └── resources │ └── META-INF │ └── services │ └── com.jn.easyjson.core.bean.propertynaming.BeanPropertyNamingPolicy ├── easyjson-fastjson ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── jn │ │ └── easyjson │ │ └── fastjson │ │ ├── EasyjsonFastjsonModule.java │ │ ├── FastJson.java │ │ ├── FastJsonAdapter.java │ │ ├── FastJsonJSONBuilder.java │ │ ├── FastJsonParserBuilder.java │ │ ├── FastJsonSerializerBuilder.java │ │ ├── codec │ │ ├── BooleanCodec.java │ │ ├── CalendarCodec.java │ │ ├── DateCodec.java │ │ ├── EnumCodec.java │ │ ├── MultiValueMapCodec.java │ │ ├── NumberCodec.java │ │ └── Typed.java │ │ ├── ext │ │ ├── EasyJsonJavaBeanDeserializer.java │ │ ├── EasyJsonParserConfig.java │ │ ├── EasyJsonSerializeConfig.java │ │ ├── FieldInfos.java │ │ └── SerializeBeanInfoGetter.java │ │ ├── filter │ │ ├── namefilter │ │ │ └── FastjsonPropertyNamingFilter.java │ │ ├── propertyfilter │ │ │ └── NullPropertyFilter.java │ │ └── readme.md │ │ └── node │ │ └── FastjsonMapper.java │ └── resources │ └── META-INF │ └── services │ └── com.jn.easyjson.core.JSONBuilder ├── easyjson-gson ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── jn │ │ └── easyjson │ │ └── gson │ │ ├── GsonAdapter.java │ │ ├── GsonJSONBuilder.java │ │ ├── bean │ │ └── fieldnaming │ │ │ └── GsonFieldNamingStrategyAdapter.java │ │ ├── exclusion │ │ ├── DelegateExclusionStrategy.java │ │ └── GsonFieldAttributesAdapter.java │ │ ├── node │ │ └── GsonJsonMapper.java │ │ └── typeadapter │ │ ├── BooleanTypeAdapter.java │ │ ├── BooleanTypeAdapterFactory.java │ │ ├── BytesTypeAdapter.java │ │ ├── BytesTypeAdapterFactory.java │ │ ├── CalendarTypeAdapter.java │ │ ├── CalendarTypeAdapterFactory.java │ │ ├── ClassAware.java │ │ ├── DateTypeAdapter.java │ │ ├── DateTypeAdapterFactory.java │ │ ├── EasyjsonAbstractTypeAdapter.java │ │ ├── EasyjsonAbstractTypeAdapterFactory.java │ │ ├── EasyjsonAdapterAnnotationTypeAdapterFactory.java │ │ ├── EasyjsonReflectiveTypeAdapterFactory.java │ │ ├── EasyjsonTypeAdapterRuntimeTypeWrapper.java │ │ ├── EnumTypeAdapter.java │ │ ├── EnumTypeAdapterFactory.java │ │ ├── FieldAware.java │ │ ├── FieldOrClassWrapper.java │ │ ├── MultiValueMapTypeAdapter.java │ │ ├── MultiValueMapTypeAdapterFactory.java │ │ ├── NumberTypeAdapter.java │ │ ├── NumberTypeAdapterFactory.java │ │ └── ObjectTypeAdapter.java │ └── resources │ └── META-INF │ └── services │ └── com.jn.easyjson.core.JSONBuilder ├── easyjson-jackson ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── jn │ │ └── easyjson │ │ └── jackson │ │ ├── DateSeries.java │ │ ├── JacksonAdapter.java │ │ ├── JacksonConstants.java │ │ ├── JacksonJSONBuilder.java │ │ ├── JacksonMigrates.java │ │ ├── Jacksons.java │ │ ├── bean │ │ └── propertynaming │ │ │ └── JacksonPropertyNamingStrategy.java │ │ ├── deserializer │ │ ├── BooleanDeserializer.java │ │ ├── ContextualDeserializer.java │ │ ├── CustomizedBeanDeserializer.java │ │ ├── DateDeserializer.java │ │ ├── Deserializers.java │ │ ├── EnumDeserializer.java │ │ └── NumberDeserializer.java │ │ ├── exception │ │ └── UnsupportedKeyTypeException.java │ │ ├── ext │ │ ├── ArrayCommaException.java │ │ ├── EasyJsonBeanDeserializerBuilder.java │ │ ├── EasyJsonBeanDeserializerFactory.java │ │ ├── EasyJsonBeanSerializerFactory.java │ │ ├── EasyJsonJacksonAnnotationIntrospector.java │ │ ├── EasyJsonObjectMapper.java │ │ ├── EasyjsonJsonFactory.java │ │ ├── EasyjsonJsonParser.java │ │ ├── EasyjsonReaderBasedJsonParser.java │ │ └── JacksonSetterConflictSelector.java │ │ ├── modifier │ │ ├── EasyjsonBeanDeserializerModifier.java │ │ └── EasyjsonBeanSerializerModifier.java │ │ ├── node │ │ └── JacksonJsonMapper.java │ │ └── serializer │ │ ├── BooleanSerializer.java │ │ ├── DateSerializer.java │ │ ├── EnumSerializer.java │ │ ├── NullSerializer.java │ │ └── NumberSerializer.java │ └── resources │ └── META-INF │ └── services │ └── com.jn.easyjson.core.JSONBuilder ├── easyjson-supports-jsonpath ├── pom.xml └── src │ └── main │ └── java │ └── com │ └── jn │ └── easyjson │ └── supports │ └── jsonpath │ ├── EasyjsonDefaults.java │ ├── EasyjsonMappingProvider.java │ ├── EasyjsonPathStartup.java │ └── EasyjsonProvider.java ├── easyjson-test ├── easyjson-examples │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── com │ │ │ └── jn │ │ │ └── easyjson │ │ │ └── tests │ │ │ └── examples │ │ │ ├── BaseTests.java │ │ │ └── struct │ │ │ ├── Contact.java │ │ │ ├── Gender.java │ │ │ ├── LikeEscaper.java │ │ │ ├── OrderBy.java │ │ │ ├── OrderByItem.java │ │ │ ├── OrderByType.java │ │ │ ├── PagingRequest.java │ │ │ ├── PagingRequestContext.java │ │ │ ├── PagingResult.java │ │ │ ├── Person.java │ │ │ ├── RowSelection.java │ │ │ ├── SelectRequest.java │ │ │ ├── SqlRequest.java │ │ │ └── SqlRequestContext.java │ │ └── test │ │ └── java │ │ └── com │ │ └── jn │ │ └── easyjson │ │ └── tests │ │ └── examples │ │ ├── EasyJsonTests.java │ │ ├── EasyJsonTestsUsingPagingRequest.java │ │ ├── JsonLibraryBridgeTests.java │ │ └── jsonlibrarytests │ │ ├── TestFastjson.java │ │ ├── TestGson.java │ │ ├── TestJackson.java │ │ ├── TestMoshi.java │ │ └── TestProgsbase.java ├── easyjson-test-base │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── jn │ │ └── easyjson │ │ └── tests │ │ ├── cases │ │ ├── 00DE8E3E-95E3-4885-A760-A269A6836AE2.txt │ │ ├── AbstractBaseTest.java │ │ ├── EasyJsonBaseTest.java │ │ ├── EasyJsonNumberTest.java │ │ ├── EasyJsonPagingRequestTest.java │ │ ├── EasyJsonPropertyNamingTest.java │ │ ├── EasyjsonArrayTest.java │ │ ├── EasyjsonHexUnicodeTest.java │ │ ├── EasyjsonNestedJsonStringTests.java │ │ ├── EasyjsonNestedJsonTests.java │ │ ├── EasyjsonPairTests.java │ │ ├── EasyjsonPerformanceTest.java │ │ ├── EasyjsonRestRespBodyTest.java │ │ ├── EasyjsonTimestampTest.java │ │ ├── gson │ │ │ ├── PagingRequestExcludeNulls.json │ │ │ ├── PagingRequestIncludeNulls.json │ │ │ └── PagingRequestNumberAsString.json │ │ └── json │ │ │ ├── BaseTestUserEntityString.json │ │ │ ├── NumberWithOriginalValue.json │ │ │ ├── NumberWithStringValue.json │ │ │ ├── PagingRequestExcludeNulls.json │ │ │ ├── PagingRequestIncludeNulls.json │ │ │ ├── PagingRequestNumberAsString.json │ │ │ ├── PanjiOperationLog.json │ │ │ ├── PersonArrayString.json │ │ │ ├── PersonObjectString.json │ │ │ ├── PersonObjectString_UpperCamelCase.json │ │ │ └── PersonObjectString_UpperCamelCase_mixed.json │ │ ├── entity │ │ ├── BusEntity.java │ │ ├── enums │ │ │ ├── CommonEnumExample.java │ │ │ └── SimpleEnumExample.java │ │ ├── struct │ │ │ ├── Contact.java │ │ │ ├── Lic.java │ │ │ ├── LikeEscaper.java │ │ │ ├── MyPairBean.java │ │ │ ├── OrderBy.java │ │ │ ├── OrderByItem.java │ │ │ ├── OrderByType.java │ │ │ ├── PagingRequest.java │ │ │ ├── PagingRequestContext.java │ │ │ ├── PagingResult.java │ │ │ ├── Person.java │ │ │ ├── RowSelection.java │ │ │ ├── SelectRequest.java │ │ │ ├── SqlRequest.java │ │ │ └── SqlRequestContext.java │ │ └── user │ │ │ ├── Address.java │ │ │ ├── Gender.java │ │ │ ├── UserEntity.java │ │ │ └── UserEntityWrapper.java │ │ └── utils │ │ ├── Asserts.java │ │ ├── DeepEqualsAssertion.java │ │ ├── ParseJsonUseFastjson.java │ │ ├── ParseJsonUseGson.java │ │ └── ParseJsonUseJackson.java ├── easyjson-test-fastjson │ ├── easyjson-test-fastjson-base │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── java │ │ │ └── com │ │ │ └── jn │ │ │ └── easyjson │ │ │ └── tests │ │ │ └── cases │ │ │ └── fastjson │ │ │ ├── FastjsonAnnotationTest.java │ │ │ └── entity │ │ │ └── NameValueRatio.java │ ├── easyjson-test-fastjson-impl │ │ ├── pom.xml │ │ └── src │ │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── jn │ │ │ └── easyjson │ │ │ └── tests │ │ │ └── cases │ │ │ └── fastjson │ │ │ └── impl │ │ │ ├── FastjsonImplAnnotationTest.java │ │ │ ├── FastjsonImplArrayTest.java │ │ │ ├── FastjsonImplBaseTest.java │ │ │ ├── FastjsonImplBytesTest.java │ │ │ ├── FastjsonImplHexUnicodeTest.java │ │ │ ├── FastjsonImplNumberTest.java │ │ │ ├── FastjsonImplPagingRequestTest.java │ │ │ ├── FastjsonImplPropertyNamingTest.java │ │ │ ├── FastjsonImplRestRespBodyTests.java │ │ │ ├── FastjsonImplTimestampTest.java │ │ │ ├── FastjsonIsFieldTest.java │ │ │ ├── FastjsonMultiValueMapDeserializerTest.java │ │ │ ├── FastjsonNestedJsonStringTests.java │ │ │ ├── FastjsonNestedJsonTest.java │ │ │ ├── FastjsonPairTests.java │ │ │ └── FastjsonPerformanceTest.java │ ├── easyjson-test-fastjson-to-gson │ │ ├── pom.xml │ │ └── src │ │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── jn │ │ │ └── easyjson │ │ │ └── tests │ │ │ └── cases │ │ │ └── fastjson_to_gson │ │ │ ├── FastjsonToGsonAnnotationTest.java │ │ │ ├── FastjsonToGsonBaseTest.java │ │ │ ├── FastjsonToGsonNumberTest.java │ │ │ ├── FastjsonToGsonPagingRequestTest.java │ │ │ ├── FastjsonToGsonTimestampTest.java │ │ │ └── FatjsonToGsonIsFieldTest.java │ ├── easyjson-test-fastjson-to-jackson │ │ ├── pom.xml │ │ └── src │ │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── jn │ │ │ └── easyjson │ │ │ └── tests │ │ │ └── cases │ │ │ └── fastjson_to_jackson │ │ │ ├── BreanchMarkTests.java │ │ │ ├── FastjsonAdapterTests.java │ │ │ ├── FastjsonToJacksonAnnotationTest.java │ │ │ ├── FastjsonToJacksonBaseTest.java │ │ │ ├── FastjsonToJacksonIsFieldTest.java │ │ │ ├── FastjsonToJacksonNumberTest.java │ │ │ ├── FastjsonToJacksonPagingRequestTest.java │ │ │ ├── FastjsonToJacksonTestJsonBuild.java │ │ │ ├── FastjsonToJacksonTimestampTest.java │ │ │ ├── NoSpringTest1.java │ │ │ ├── VersionUtilTest.java │ │ │ └── test001 │ │ │ ├── Model.java │ │ │ ├── Test001.java │ │ │ ├── fastjson_to_jackson_001.json │ │ │ └── fastjson_to_jackson_002.json │ └── pom.xml ├── easyjson-test-gson │ ├── easyjson-test-gson-base │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── java │ │ │ └── com │ │ │ └── jn │ │ │ └── easyjson │ │ │ └── tests │ │ │ └── cases │ │ │ ├── GsonAnnotationTest.java │ │ │ └── GsonBytesTest.java │ ├── easyjson-test-gson-impl │ │ ├── pom.xml │ │ └── src │ │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── jn │ │ │ └── easyjson │ │ │ └── tests │ │ │ └── cases │ │ │ ├── GsonImplAnnotationTest.java │ │ │ ├── GsonImplArrayTest.java │ │ │ ├── GsonImplBaseTest.java │ │ │ ├── GsonImplBytesTest.java │ │ │ ├── GsonImplHexUnicodeTest.java │ │ │ ├── GsonImplNumberTest.java │ │ │ ├── GsonImplPagingRequestTest.java │ │ │ ├── GsonImplPropertyNamingTest.java │ │ │ ├── GsonImplRestRespBodyTest.java │ │ │ ├── GsonImplTimestampTest.java │ │ │ ├── GsonMultiValueMapDeserializerTest.java │ │ │ ├── GsonNestedJsonStringTests.java │ │ │ ├── GsonNestedJsonTest.java │ │ │ └── GsonPairTest.java │ ├── easyjson-test-gson-to-jackson │ │ ├── pom.xml │ │ └── src │ │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── jn │ │ │ └── easyjson │ │ │ └── test │ │ │ └── gson │ │ │ └── jackson │ │ │ └── cases │ │ │ ├── GsonToJacksonAnnotationTest.java │ │ │ ├── GsonToJacksonBaseTest.java │ │ │ └── GsonToJacksonPagingRequestTest.java │ ├── easysjon-test-gson-to-fastjson │ │ ├── pom.xml │ │ └── src │ │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── jn │ │ │ └── easyjson │ │ │ └── tests │ │ │ └── gson │ │ │ └── cases │ │ │ ├── GsonToFastjsonAnnotationTest.java │ │ │ ├── GsonToFastjsonBaseTest.java │ │ │ └── GsonToFastjsonPagingRequestTest.java │ └── pom.xml ├── easyjson-test-jackson │ ├── easyjson-test-jackson-base │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── java │ │ │ └── com │ │ │ └── jn │ │ │ └── easyjson │ │ │ └── tests │ │ │ └── cases │ │ │ └── JacksonAnnotationTest.java │ ├── easyjson-test-jackson-impl │ │ ├── pom.xml │ │ └── src │ │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── jn │ │ │ └── easyjson │ │ │ └── tests │ │ │ └── cases │ │ │ ├── FloatTests.java │ │ │ ├── JacksonBytesTest.java │ │ │ ├── JacksonFormatTest.java │ │ │ ├── JacksonImplAnnotationTest.java │ │ │ ├── JacksonImplBaseTest.java │ │ │ ├── JacksonImplHexUnicodeTest.java │ │ │ ├── JacksonImplNumberTest.java │ │ │ ├── JacksonImplPagingRequestTest.java │ │ │ ├── JacksonImplRestRespBodyTest.java │ │ │ ├── JacksonImplTimestampTest.java │ │ │ ├── JacksonImpleArrayTest.java │ │ │ ├── JacksonMultiValueMapDeserializerTest.java │ │ │ ├── JacksonNestedJsonTest.java │ │ │ ├── JacksonNetstedJsonStringTests.java │ │ │ ├── JacksonPairTests.java │ │ │ ├── JacksonPropertyNamingTests.java │ │ │ └── Xyz.java │ └── pom.xml ├── easyjson-test-jsonlib │ ├── easyjson-test-jsonlib-base │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── java │ │ │ └── com │ │ │ └── jn │ │ │ └── easyjson │ │ │ └── tests │ │ │ ├── annotation │ │ │ └── JsonIgnore.java │ │ │ └── cases │ │ │ └── JsonlibAnnotationTest.java │ ├── easyjson-test-jsonlib-to-fastjson │ │ ├── pom.xml │ │ └── src │ │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── jn │ │ │ └── easyjson │ │ │ └── tests │ │ │ └── cases │ │ │ ├── JsonlibToFastjsonAnnotationTest.java │ │ │ ├── JsonlibToFastjsonBaseTest.java │ │ │ ├── JsonlibToFastjsonNumberTest.java │ │ │ └── JsonlibToFastjsonPagingRequestTest.java │ ├── easyjson-test-jsonlib-to-gson │ │ ├── pom.xml │ │ └── src │ │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── jn │ │ │ └── easyjson │ │ │ └── tests │ │ │ └── cases │ │ │ ├── JsonlibToGsonAnnotationTest.java │ │ │ ├── JsonlibToGsonBaseTest.java │ │ │ ├── JsonlibToGsonNumberTest.java │ │ │ └── JsonlibToGsonPagingRequestTest.java │ ├── easyjson-test-jsonlib-to-jackson │ │ ├── pom.xml │ │ └── src │ │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── jn │ │ │ └── easyjson │ │ │ └── tests │ │ │ └── cases │ │ │ ├── JsonlibToJacksonAnnotationTest.java │ │ │ ├── JsonlibToJacksonBaseTest.java │ │ │ ├── JsonlibToJacksonNumberTest.java │ │ │ └── JsonlibToJacksonPagingRequestTest.java │ └── pom.xml └── pom.xml ├── fastjson-to-easyjson ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── alibaba │ │ │ └── fastjson │ │ │ ├── JSON.java │ │ │ ├── JSONArray.java │ │ │ ├── JSONAware.java │ │ │ ├── JSONException.java │ │ │ ├── JSONObject.java │ │ │ ├── JSONPObject.java │ │ │ ├── JSONPath.java │ │ │ ├── JSONPathException.java │ │ │ ├── JSONReader.java │ │ │ ├── JSONStreamAware.java │ │ │ ├── JSONStreamContext.java │ │ │ ├── JSONWriter.java │ │ │ ├── PropertyNamingStrategy.java │ │ │ ├── TypeReference.java │ │ │ ├── annotation │ │ │ ├── JSONCreator.java │ │ │ ├── JSONField.java │ │ │ ├── JSONPOJOBuilder.java │ │ │ └── JSONType.java │ │ │ ├── asm │ │ │ ├── ByteVector.java │ │ │ ├── ClassReader.java │ │ │ ├── ClassWriter.java │ │ │ ├── FieldWriter.java │ │ │ ├── Item.java │ │ │ ├── Label.java │ │ │ ├── MethodCollector.java │ │ │ ├── MethodVisitor.java │ │ │ ├── MethodWriter.java │ │ │ ├── Opcodes.java │ │ │ ├── Type.java │ │ │ └── TypeCollector.java │ │ │ ├── easyjson │ │ │ ├── FastEasyJsons.java │ │ │ ├── FastjsonAnnotationExclusion.java │ │ │ ├── FastjsonCodecConfigurationRepository.java │ │ │ ├── JsonFieldFinder.java │ │ │ ├── JsonFieldParser.java │ │ │ ├── JsonFieldPropertyCodeConfigurationMerger.java │ │ │ ├── JsonMapper.java │ │ │ └── JsonTypeParser.java │ │ │ ├── parser │ │ │ ├── DefaultExtJSONParser.java │ │ │ ├── DefaultJSONParser.java │ │ │ ├── Feature.java │ │ │ ├── JSONLexer.java │ │ │ ├── JSONLexerBase.java │ │ │ ├── JSONReaderScanner.java │ │ │ ├── JSONScanner.java │ │ │ ├── JSONToken.java │ │ │ ├── ParseContext.java │ │ │ ├── ParserConfig.java │ │ │ ├── SymbolTable.java │ │ │ └── deserializer │ │ │ │ ├── ASMDeserializerFactory.java │ │ │ │ ├── AbstractDateDeserializer.java │ │ │ │ ├── ArrayListTypeFieldDeserializer.java │ │ │ │ ├── AutowiredObjectDeserializer.java │ │ │ │ ├── ContextObjectDeserializer.java │ │ │ │ ├── DefaultFieldDeserializer.java │ │ │ │ ├── EnumDeserializer.java │ │ │ │ ├── ExtraProcessable.java │ │ │ │ ├── ExtraProcessor.java │ │ │ │ ├── ExtraTypeProvider.java │ │ │ │ ├── FieldDeserializer.java │ │ │ │ ├── FieldTypeResolver.java │ │ │ │ ├── JSONPDeserializer.java │ │ │ │ ├── JavaBeanDeserializer.java │ │ │ │ ├── JavaObjectDeserializer.java │ │ │ │ ├── MapDeserializer.java │ │ │ │ ├── NumberDeserializer.java │ │ │ │ ├── ObjectDeserializer.java │ │ │ │ ├── ParseProcess.java │ │ │ │ ├── PropertyProcessable.java │ │ │ │ ├── PropertyProcessableDeserializer.java │ │ │ │ ├── ResolveFieldDeserializer.java │ │ │ │ ├── SqlDateDeserializer.java │ │ │ │ ├── StackTraceElementDeserializer.java │ │ │ │ ├── ThrowableDeserializer.java │ │ │ │ └── TimeDeserializer.java │ │ │ ├── serializer │ │ │ ├── ASMSerializerFactory.java │ │ │ ├── AfterFilter.java │ │ │ ├── AnnotationSerializer.java │ │ │ ├── AppendableSerializer.java │ │ │ ├── ArraySerializer.java │ │ │ ├── AtomicCodec.java │ │ │ ├── AutowiredObjectSerializer.java │ │ │ ├── AwtCodec.java │ │ │ ├── BeanContext.java │ │ │ ├── BeforeFilter.java │ │ │ ├── BigDecimalCodec.java │ │ │ ├── BigIntegerCodec.java │ │ │ ├── BooleanCodec.java │ │ │ ├── ByteBufferCodec.java │ │ │ ├── CalendarCodec.java │ │ │ ├── CharArrayCodec.java │ │ │ ├── CharacterCodec.java │ │ │ ├── ClobSeriliazer.java │ │ │ ├── CollectionCodec.java │ │ │ ├── ContextObjectSerializer.java │ │ │ ├── ContextValueFilter.java │ │ │ ├── DateCodec.java │ │ │ ├── DoubleSerializer.java │ │ │ ├── EnumSerializer.java │ │ │ ├── EnumerationSerializer.java │ │ │ ├── FieldSerializer.java │ │ │ ├── FloatCodec.java │ │ │ ├── GuavaCodec.java │ │ │ ├── IntegerCodec.java │ │ │ ├── JSONAwareSerializer.java │ │ │ ├── JSONLibDataFormatSerializer.java │ │ │ ├── JSONSerializable.java │ │ │ ├── JSONSerializableSerializer.java │ │ │ ├── JSONSerializer.java │ │ │ ├── JSONSerializerMap.java │ │ │ ├── JavaBeanSerializer.java │ │ │ ├── JodaCodec.java │ │ │ ├── LabelFilter.java │ │ │ ├── Labels.java │ │ │ ├── ListSerializer.java │ │ │ ├── LongCodec.java │ │ │ ├── MapSerializer.java │ │ │ ├── MiscCodec.java │ │ │ ├── NameFilter.java │ │ │ ├── ObjectArrayCodec.java │ │ │ ├── ObjectSerializer.java │ │ │ ├── PascalNameFilter.java │ │ │ ├── PrimitiveArraySerializer.java │ │ │ ├── PropertyFilter.java │ │ │ ├── PropertyPreFilter.java │ │ │ ├── ReferenceCodec.java │ │ │ ├── SerialContext.java │ │ │ ├── SerializeBeanInfo.java │ │ │ ├── SerializeConfig.java │ │ │ ├── SerializeFilter.java │ │ │ ├── SerializeFilterable.java │ │ │ ├── SerializeWriter.java │ │ │ ├── SerializerFeature.java │ │ │ ├── SimpleDateFormatSerializer.java │ │ │ ├── SimplePropertyPreFilter.java │ │ │ ├── StringCodec.java │ │ │ ├── ToStringSerializer.java │ │ │ └── ValueFilter.java │ │ │ ├── spi │ │ │ └── Module.java │ │ │ ├── support │ │ │ ├── config │ │ │ │ └── FastJsonConfig.java │ │ │ ├── hsf │ │ │ │ ├── HSFJSONUtils.java │ │ │ │ └── MethodLocator.java │ │ │ ├── jaxrs │ │ │ │ ├── FastJsonAutoDiscoverable.java │ │ │ │ ├── FastJsonFeature.java │ │ │ │ └── FastJsonProvider.java │ │ │ ├── retrofit │ │ │ │ └── Retrofit2ConverterFactory.java │ │ │ ├── spring │ │ │ │ ├── FastJsonContainer.java │ │ │ │ ├── FastJsonHttpMessageConverter.java │ │ │ │ ├── FastJsonHttpMessageConverter4.java │ │ │ │ ├── FastJsonJsonView.java │ │ │ │ ├── FastJsonRedisSerializer.java │ │ │ │ ├── FastJsonViewResponseBodyAdvice.java │ │ │ │ ├── FastJsonpHttpMessageConverter4.java │ │ │ │ ├── FastJsonpResponseBodyAdvice.java │ │ │ │ ├── FastjsonSockJsMessageCodec.java │ │ │ │ ├── GenericFastJsonRedisSerializer.java │ │ │ │ ├── JSONPResponseBodyAdvice.java │ │ │ │ ├── MappingFastJsonValue.java │ │ │ │ ├── PropertyPreFilters.java │ │ │ │ ├── annotation │ │ │ │ │ ├── FastJsonFilter.java │ │ │ │ │ ├── FastJsonView.java │ │ │ │ │ └── ResponseJSONP.java │ │ │ │ └── messaging │ │ │ │ │ └── MappingFastJsonMessageConverter.java │ │ │ └── springfox │ │ │ │ └── SwaggerJsonSerializer.java │ │ │ └── util │ │ │ ├── ASMClassLoader.java │ │ │ ├── ASMUtils.java │ │ │ ├── AntiCollisionHashMap.java │ │ │ ├── Base64.java │ │ │ ├── FieldInfo.java │ │ │ ├── GenericArrayTypeImpl.java │ │ │ ├── IOUtils.java │ │ │ ├── IdentityHashMap.java │ │ │ ├── JavaBeanInfo.java │ │ │ ├── ParameterizedTypeImpl.java │ │ │ ├── RyuDouble.java │ │ │ ├── RyuFloat.java │ │ │ ├── ServiceLoader.java │ │ │ ├── ThreadLocalCache.java │ │ │ ├── TypeUtils.java │ │ │ └── UTF8Decoder.java │ └── resources │ │ └── META-INF │ │ └── services │ │ └── com.jn.easyjson.core.codec.dialect.CodecConfigurationRepository │ └── test │ └── java │ └── com │ └── jn │ └── easyjson │ └── tests │ └── fastjson │ ├── FastjsonAnnotationTests.java │ ├── FastjsonToEasyjsonTests.java │ ├── JSONSerializerTests.java │ ├── NumberParserTests.java │ └── User.java ├── gson-to-easyjson ├── pom.xml └── src │ └── main │ └── java │ └── com │ └── google │ └── gson │ ├── DefaultDateTypeAdapter.java │ ├── ExclusionStrategy.java │ ├── FieldAttributes.java │ ├── FieldNamingPolicy.java │ ├── FieldNamingStrategy.java │ ├── Gson.java │ ├── GsonBuilder.java │ ├── InstanceCreator.java │ ├── JsonArray.java │ ├── JsonDeserializationContext.java │ ├── JsonDeserializer.java │ ├── JsonElement.java │ ├── JsonIOException.java │ ├── JsonNull.java │ ├── JsonObject.java │ ├── JsonParseException.java │ ├── JsonParser.java │ ├── JsonPrimitive.java │ ├── JsonSerializationContext.java │ ├── JsonSerializer.java │ ├── JsonStreamParser.java │ ├── JsonSyntaxException.java │ ├── LongSerializationPolicy.java │ ├── TypeAdapter.java │ ├── TypeAdapterFactory.java │ ├── annotations │ ├── Expose.java │ ├── JsonAdapter.java │ ├── SerializedName.java │ ├── Since.java │ ├── Until.java │ └── package-info.java │ ├── easyjson │ ├── GsonEasyJsons.java │ └── GsonExcluderExclusion.java │ ├── internal │ ├── $Gson$Preconditions.java │ ├── $Gson$Types.java │ ├── ConstructorConstructor.java │ ├── Excluder.java │ ├── GsonBuildConfig.java │ ├── JavaVersion.java │ ├── JsonReaderInternalAccess.java │ ├── LazilyParsedNumber.java │ ├── LinkedHashTreeMap.java │ ├── LinkedTreeMap.java │ ├── ObjectConstructor.java │ ├── PreJava9DateFormatProvider.java │ ├── Primitives.java │ ├── Streams.java │ ├── UnsafeAllocator.java │ ├── bind │ │ ├── ArrayTypeAdapter.java │ │ ├── CollectionTypeAdapterFactory.java │ │ ├── DateTypeAdapter.java │ │ ├── JsonAdapterAnnotationTypeAdapterFactory.java │ │ ├── JsonTreeReader.java │ │ ├── JsonTreeWriter.java │ │ ├── MapTypeAdapterFactory.java │ │ ├── ObjectTypeAdapter.java │ │ ├── ReflectiveTypeAdapterFactory.java │ │ ├── SqlDateTypeAdapter.java │ │ ├── TimeTypeAdapter.java │ │ ├── TreeTypeAdapter.java │ │ ├── TypeAdapterRuntimeTypeWrapper.java │ │ ├── TypeAdapters.java │ │ └── util │ │ │ └── ISO8601Utils.java │ ├── package-info.java │ └── reflect │ │ ├── PreJava9ReflectionAccessor.java │ │ ├── ReflectionAccessor.java │ │ └── UnsafeReflectionAccessor.java │ ├── package-info.java │ ├── reflect │ ├── TypeToken.java │ └── package-info.java │ └── stream │ ├── JsonReader.java │ ├── JsonScope.java │ ├── JsonToken.java │ ├── JsonWriter.java │ └── MalformedJsonException.java ├── jettison-to-easyjson ├── pom.xml └── src │ └── main │ └── java │ └── org │ └── codehaus │ └── jettison │ ├── AbstractDOMDocumentParser.java │ ├── AbstractDOMDocumentSerializer.java │ ├── AbstractXMLEventWriter.java │ ├── AbstractXMLInputFactory.java │ ├── AbstractXMLOutputFactory.java │ ├── AbstractXMLStreamReader.java │ ├── AbstractXMLStreamWriter.java │ ├── Convention.java │ ├── JSONSequenceTooLargeException.java │ ├── Node.java │ ├── XsonNamespaceContext.java │ ├── badgerfish │ ├── BadgerFishConvention.java │ ├── BadgerFishDOMDocumentParser.java │ ├── BadgerFishDOMDocumentSerializer.java │ ├── BadgerFishXMLInputFactory.java │ ├── BadgerFishXMLOutputFactory.java │ ├── BadgerFishXMLStreamReader.java │ └── BadgerFishXMLStreamWriter.java │ ├── json │ ├── JSONArray.java │ ├── JSONException.java │ ├── JSONObject.java │ ├── JSONString.java │ ├── JSONStringer.java │ ├── JSONTokener.java │ ├── JSONWriter.java │ └── easyjson │ │ ├── BeanPropertyNameExclusion.java │ │ └── JettisonJsonMapper.java │ ├── mapped │ ├── Configuration.java │ ├── DefaultConverter.java │ ├── MappedDOMDocumentParser.java │ ├── MappedDOMDocumentSerializer.java │ ├── MappedNamespaceConvention.java │ ├── MappedXMLInputFactory.java │ ├── MappedXMLOutputFactory.java │ ├── MappedXMLStreamReader.java │ ├── MappedXMLStreamWriter.java │ ├── SimpleConverter.java │ └── TypeConverter.java │ └── util │ ├── FastStack.java │ └── StringIndenter.java ├── jsonlib-to-easyjson ├── pom.xml └── src │ └── main │ └── java │ └── net │ └── sf │ └── json │ ├── AbstractJSON.java │ ├── JSON.java │ ├── JSONArray.java │ ├── JSONException.java │ ├── JSONFunction.java │ ├── JSONNull.java │ ├── JSONObject.java │ ├── JSONSerializer.java │ ├── JSONString.java │ ├── JsonConfig.java │ ├── JsonTokeners.java │ ├── easyjson │ └── JsonMapper.java │ ├── processors │ ├── DefaultDefaultValueProcessor.java │ ├── DefaultValueProcessor.java │ ├── DefaultValueProcessorMatcher.java │ ├── JsDateJsonBeanProcessor.java │ ├── JsDateJsonValueProcessor.java │ ├── JsonBeanProcessor.java │ ├── JsonBeanProcessorMatcher.java │ ├── JsonValueProcessor.java │ ├── JsonValueProcessorMatcher.java │ ├── JsonVerifier.java │ ├── PropertyNameProcessor.java │ └── PropertyNameProcessorMatcher.java │ └── util │ ├── CycleDetectionStrategy.java │ ├── Entry.java │ ├── EqualsBuilder.java │ ├── HashCodeBuilder.java │ ├── IDKey.java │ ├── JSONTokener.java │ ├── JSONUtils.java │ ├── JavaIdentifierTransformer.java │ ├── JsonEventListener.java │ ├── NewBeanInstanceStrategy.java │ ├── PropertyExclusionClassMatcher.java │ ├── PropertyFilter.java │ ├── PropertySetStrategy.java │ └── ReflectionToStringBuilder.java ├── jsonsmart-to-easyjson ├── pom.xml └── src │ └── main │ └── java │ └── net │ └── minidev │ └── json │ ├── JSONArray.java │ ├── JSONAware.java │ ├── JSONAwareEx.java │ ├── JSONNavi.java │ ├── JSONObject.java │ ├── JSONStreamAware.java │ ├── JSONStreamAwareEx.java │ ├── JSONStyle.java │ ├── JSONUtil.java │ ├── JSONValue.java │ ├── JStylerObj.java │ ├── JsonMapper.java │ ├── annotate │ ├── JsonIgnore.java │ └── JsonSmartAnnotation.java │ ├── parser │ └── ParseException.java │ ├── reader │ └── JsonWriterI.java │ └── writer │ ├── FakeMapper.java │ ├── JsonReader.java │ └── JsonReaderI.java ├── maven_settings_for_travisci.xml ├── minimaljson-to-easyjson ├── pom.xml └── src │ └── main │ └── java │ └── com │ └── eclipsesource │ └── json │ ├── Json.java │ ├── JsonArray.java │ ├── JsonHandler.java │ ├── JsonLiteral.java │ ├── JsonMapper.java │ ├── JsonNumber.java │ ├── JsonObject.java │ ├── JsonParser.java │ ├── JsonString.java │ ├── JsonValue.java │ ├── JsonWriter.java │ ├── Location.java │ ├── ParseException.java │ ├── PrettyPrint.java │ ├── WriterConfig.java │ └── WritingBuffer.java ├── moshi-to-easyjson ├── pom.xml └── src │ ├── main │ └── java │ │ └── com │ │ └── squareup │ │ └── moshi │ │ ├── AdapterMethodsFactory.java │ │ ├── ArrayJsonAdapter.java │ │ ├── ClassFactory.java │ │ ├── ClassJsonAdapter.java │ │ ├── CollectionJsonAdapter.java │ │ ├── FromJson.java │ │ ├── Json.java │ │ ├── JsonAdapter.java │ │ ├── JsonClass.java │ │ ├── JsonDataException.java │ │ ├── JsonEncodingException.java │ │ ├── JsonQualifier.java │ │ ├── JsonReader.java │ │ ├── JsonScope.java │ │ ├── JsonUtf8Reader.java │ │ ├── JsonUtf8Writer.java │ │ ├── JsonValueReader.java │ │ ├── JsonValueWriter.java │ │ ├── JsonWriter.java │ │ ├── LinkedHashTreeMap.java │ │ ├── MapJsonAdapter.java │ │ ├── Moshi.java │ │ ├── Rfc3339DateJsonAdapter.java │ │ ├── StandardJsonAdapters.java │ │ ├── ToJson.java │ │ ├── Types.java │ │ ├── adapters │ │ ├── EnumJsonAdapter.java │ │ ├── Iso8601Utils.java │ │ ├── PolymorphicJsonAdapterFactory.java │ │ └── Rfc3339DateJsonAdapter.java │ │ ├── easyjson │ │ ├── EasyJsonAdapter.java │ │ └── EasyJsonAdapterFactory.java │ │ ├── internal │ │ ├── NonNullJsonAdapter.java │ │ ├── NullSafeJsonAdapter.java │ │ └── Util.java │ │ └── package-info.java │ └── test │ └── java │ └── com │ └── jn │ └── easyjson │ └── moshi │ └── tests │ └── TestMoshi.java ├── orgjson-to-easyjson ├── pom.xml └── src │ └── main │ └── java │ └── org │ └── json │ ├── CDL.java │ ├── Cookie.java │ ├── CookieList.java │ ├── HTTP.java │ ├── HTTPTokener.java │ ├── JSONArray.java │ ├── JSONException.java │ ├── JSONML.java │ ├── JSONObject.java │ ├── JSONPointer.java │ ├── JSONPointerException.java │ ├── JSONPropertyIgnore.java │ ├── JSONPropertyName.java │ ├── JSONString.java │ ├── JSONStringer.java │ ├── JSONTokener.java │ ├── JSONWriter.java │ ├── JsonMapper.java │ ├── JsonTokeners.java │ ├── Property.java │ ├── XML.java │ └── XMLTokener.java ├── pom.xml ├── progsbase-to-easyjson ├── pom.xml └── src │ ├── main │ └── java │ │ ├── JSON │ │ ├── ElementLists │ │ │ ├── ElementArrayReference.java │ │ │ └── ElementLists.java │ │ ├── StringElementMaps │ │ │ ├── StringElementMap.java │ │ │ └── StringElementMaps.java │ │ ├── elementTypeEnum │ │ │ └── elementTypeEnum.java │ │ ├── json │ │ │ └── json.java │ │ └── structures │ │ │ ├── Element.java │ │ │ ├── ElementReference.java │ │ │ └── ElementType.java │ │ ├── arrays │ │ └── arrays │ │ │ └── arrays.java │ │ ├── charCharacters │ │ └── Characters │ │ │ └── Characters.java │ │ ├── com │ │ └── progsbase │ │ │ └── libraries │ │ │ └── JSON │ │ │ ├── GenericTypeGetter.java │ │ │ ├── JSONException.java │ │ │ ├── JSONObjectReader.java │ │ │ ├── JSONObjectWriter.java │ │ │ ├── JSONReflectiveReader.java │ │ │ ├── JSONReflectiveWriter.java │ │ │ ├── JSONReturn.java │ │ │ ├── Reference.java │ │ │ ├── StringReference.java │ │ │ └── StringReturn.java │ │ ├── lists │ │ ├── BooleanList │ │ │ └── BooleanList.java │ │ ├── CharacterList │ │ │ └── CharacterList.java │ │ ├── NumberList │ │ │ └── NumberList.java │ │ └── StringList │ │ │ └── StringList.java │ │ ├── math │ │ └── math │ │ │ └── math.java │ │ ├── nnumbers │ │ ├── NumberToString │ │ │ └── NumberToString.java │ │ └── StringToNumber │ │ │ └── StringToNumber.java │ │ ├── references │ │ └── references │ │ │ ├── BooleanArrayReference.java │ │ │ ├── BooleanReference.java │ │ │ ├── CharacterReference.java │ │ │ ├── NumberArrayReference.java │ │ │ ├── NumberReference.java │ │ │ ├── StringArrayReference.java │ │ │ ├── StringReference.java │ │ │ └── references.java │ │ └── strstrings │ │ └── strings │ │ └── strings.java │ └── test │ └── java │ └── com │ └── jn │ └── easyjson │ └── tests │ └── progsbase │ └── ProgsBaseTests.java └── simplejson-to-easyjson ├── pom.xml └── src └── main └── java └── org └── json └── simple ├── ItemList.java ├── JSONArray.java ├── JSONAware.java ├── JSONObject.java ├── JSONStreamAware.java ├── JSONValue.java ├── JsonMapper.java └── parser ├── ContainerFactory.java ├── ContentHandler.java ├── JSONParser.java ├── ParseException.java ├── Yylex.java └── Yytoken.java /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | *.iml 3 | target/ 4 | .settings/ 5 | 6 | # eclipse 7 | .project 8 | .classpath 9 | 10 | # testng 11 | test-output/ 12 | 13 | # Compiled class file 14 | *.class 15 | 16 | # Log file 17 | *.log 18 | 19 | # BlueJ files 20 | *.ctxt 21 | 22 | # Mobile Tools for Java (J2ME) 23 | .mtj.tmp/ 24 | 25 | # Package Files # 26 | *.jar 27 | *.war 28 | *.nar 29 | *.ear 30 | *.zip 31 | *.tar.gz 32 | *.rar 33 | 34 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 35 | hs_err_pid* 36 | 37 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: java 2 | 3 | matrix: 4 | include: 5 | - jdk: openjdk8 6 | env: compilejdk=openjdk8 7 | - jdk: openjdk10 8 | env: compilejdk=openjdk10 9 | 10 | # install: true # use it to skip default install dependencies command: mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V 11 | 12 | # before_script: 13 | # - export 14 | # - !!str "[[ $compilejdk = 'openjdk6' ]] && export JAVA_HOME='/usr/lib/jvm/java-6-openjdk-amd64'" 15 | # - export 16 | # - java -version 17 | # - mvn --version 18 | # script: 19 | # - mvn clean package -DskipDocs -s "$TRAVIS_BUILD_DIR/maven_settings_for_travisci.xml" 20 | 21 | git: 22 | quiet: true 23 | branches: 24 | only: 25 | - master 26 | 27 | notifications: 28 | slack: 29 | on_success: always 30 | email: 31 | recipients: 32 | - fs1194361820@163.com 33 | on_success: never 34 | on_failure: always 35 | 36 | -------------------------------------------------------------------------------- /RELEASE-NOTES.MD: -------------------------------------------------------------------------------- 1 | ## 4.1.6 (进行中) 2 | 1. 移除 easyjson-javaxjson 3 | 2. 升级langx-java到5.4.0版本 4 | -------------------------------------------------------------------------------- /androidjson-to-easyjson/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | io.github.bes2008.solution.easyjson 7 | easyjson 8 | 4.1.6 9 | 10 | 4.0.0 11 | 12 | androidjson-to-easyjson 13 | ${project.groupId}:${project.artifactId}:${project.version} 14 | 15 | Adapter android json library to easyjson 16 | 17 | 18 | 19 | io.github.bes2008.solution.easyjson 20 | easyjson-core 21 | 22 | 23 | -------------------------------------------------------------------------------- /androidjson-to-easyjson/src/main/java/org/json/JsonTokeners.java: -------------------------------------------------------------------------------- 1 | package org.json; 2 | 3 | public class JsonTokeners { 4 | public static String readToString(JSONTokener jsonTokener) { 5 | if (jsonTokener == null) { 6 | return null; 7 | } 8 | StringBuilder stringBuilder = new StringBuilder(255); 9 | while (jsonTokener.more()) { 10 | stringBuilder.append(jsonTokener.next()); 11 | } 12 | return stringBuilder.toString(); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /easyjson-antlr4json/.gitignore: -------------------------------------------------------------------------------- 1 | src/generated/ -------------------------------------------------------------------------------- /easyjson-antlr4json/src/generated/java/com/jn/easyjson/antlr4json/generated/Json.tokens: -------------------------------------------------------------------------------- 1 | WS=1 2 | NUMBER=2 3 | BOOL=3 4 | STRING=4 5 | COMMENT=5 6 | NULL=6 7 | OBJ_START=7 8 | OBJ_END=8 9 | PAIR_SEPAR=9 10 | ARRAY_SEPAR=10 11 | ARRAY_START=11 12 | ARRAY_END=12 13 | 'null'=6 14 | '{'=7 15 | '}'=8 16 | ':'=9 17 | ','=10 18 | '['=11 19 | ']'=12 20 | -------------------------------------------------------------------------------- /easyjson-antlr4json/src/generated/java/com/jn/easyjson/antlr4json/generated/JsonLexer.tokens: -------------------------------------------------------------------------------- 1 | WS=1 2 | NUMBER=2 3 | BOOL=3 4 | STRING=4 5 | COMMENT=5 6 | NULL=6 7 | OBJ_START=7 8 | OBJ_END=8 9 | PAIR_SEPAR=9 10 | ARRAY_SEPAR=10 11 | ARRAY_START=11 12 | ARRAY_END=12 13 | 'null'=6 14 | '{'=7 15 | '}'=8 16 | ':'=9 17 | ','=10 18 | '['=11 19 | ']'=12 20 | -------------------------------------------------------------------------------- /easyjson-antlr4json/src/test/resources/example001.json: -------------------------------------------------------------------------------- 1 | // Taken from http://www.json.org/example 2 | {"menu": { 3 | "id": "file", 4 | "value": "File", 5 | "popup": { 6 | "menuitem": [ 7 | {"value": "New", "onclick": "CreateNewDoc()"}, 8 | {"value": "Open", "onclick": "OpenDoc()"}, 9 | {"value": "Close", "onclick": "CloseDoc()"} 10 | ] 11 | } 12 | }} -------------------------------------------------------------------------------- /easyjson-antlr4json/src/test/resources/example002.json: -------------------------------------------------------------------------------- 1 | { // Taken from http://www.json.org/example 2 | "glossary": { 3 | "title": "example glossary", 4 | "GlossDiv": { 5 | "title": "S", 6 | "GlossList": { 7 | "GlossEntry": { 8 | "ID": "SGML", 9 | "SortAs": "SGML", 10 | "GlossTerm": "Standard Generalized Markup Language", 11 | "Acronym": "SGML", 12 | "Abbrev": "ISO 8879:1986", 13 | "GlossDef": { 14 | "para": "A meta-markup language, used to create markup languages such as DocBook.", 15 | "GlossSeeAlso": ["GML", "XML"] 16 | }, 17 | "GlossSee": "markup" 18 | } 19 | } 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /easyjson-antlr4json/src/test/resources/example003.json: -------------------------------------------------------------------------------- 1 | // Taken and modified from https://en.wikipedia.org/wiki/JSON 2 | { // Added comments 3 | "firstName": "John", 4 | "lastName": "Smith", 5 | "age": 25, 6 | "address": { 7 | "streetAddress": "21 2nd Street", 8 | "postalCode": "10021-3100" 9 | }, 10 | "phoneNumbers": /* several numbers!*/ [ 11 | { 12 | "type": "home", // Home sweet home 13 | "number": "212 555-1234" 14 | }, 15 | { 16 | "type": "mobile", 17 | "number": "123 456-7890" 18 | } /* seeems to work! */ 19 | ] 20 | } -------------------------------------------------------------------------------- /easyjson-core/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | io.github.bes2008.solution.easyjson 7 | easyjson 8 | 4.1.6 9 | 10 | 4.0.0 11 | 12 | easyjson-core 13 | ${project.groupId}:${project.artifactId}:${project.version} 14 | 15 | the easyjson core 16 | 17 | 18 | -------------------------------------------------------------------------------- /easyjson-core/src/main/java/com/jn/easyjson/core/JSONBuilderAware.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 the original author or authors. 3 | * 4 | * Licensed under the Apache, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at http://www.gnu.org/licenses/lgpl-3.0.html 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | package com.jn.easyjson.core; 16 | 17 | public interface JSONBuilderAware { 18 | void setJSONBuilder(T jsonBuilder); 19 | T getJSONBuilder(); 20 | } 21 | -------------------------------------------------------------------------------- /easyjson-core/src/main/java/com/jn/easyjson/core/JSONBuilderCustomizer.java: -------------------------------------------------------------------------------- 1 | package com.jn.easyjson.core; 2 | 3 | import com.jn.langx.NamedCustomizer; 4 | import com.jn.langx.Ordered; 5 | 6 | public interface JSONBuilderCustomizer extends Ordered, NamedCustomizer { 7 | @Override 8 | void customize(JSONBuilder jsonBuilder); 9 | } 10 | -------------------------------------------------------------------------------- /easyjson-core/src/main/java/com/jn/easyjson/core/JSONFactory.java: -------------------------------------------------------------------------------- 1 | package com.jn.easyjson.core; 2 | 3 | import com.jn.langx.util.function.Supplier0; 4 | 5 | public interface JSONFactory extends Supplier0, JSONBuilderAware{ 6 | 7 | } 8 | -------------------------------------------------------------------------------- /easyjson-core/src/main/java/com/jn/easyjson/core/JsonCustomizer.java: -------------------------------------------------------------------------------- 1 | package com.jn.easyjson.core; 2 | 3 | import com.jn.langx.Customizer; 4 | 5 | public interface JsonCustomizer extends Customizer { 6 | void customize(JSON json); 7 | } 8 | -------------------------------------------------------------------------------- /easyjson-core/src/main/java/com/jn/easyjson/core/JsonHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 the original author or authors. 3 | * 4 | * Licensed under the Apache, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at http://www.gnu.org/licenses/lgpl-3.0.html 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | package com.jn.easyjson.core; 16 | 17 | import java.io.Reader; 18 | import java.lang.reflect.Type; 19 | 20 | public interface JsonHandler { 21 | 22 | JsonTreeNode deserialize(String json) throws JsonException; 23 | 24 | T deserialize(String json, Type typeOfT) throws JsonException; 25 | 26 | T deserialize(Reader reader, Type typeOfT) throws JsonException; 27 | 28 | String serialize(Object src, Type typeOfT) throws JsonException; 29 | 30 | JSONBuilder getJsonBuilder(); 31 | void setJsonBuilder(JSONBuilder jsonBuilder); 32 | } 33 | -------------------------------------------------------------------------------- /easyjson-core/src/main/java/com/jn/easyjson/core/JsonHandlerAdapter.java: -------------------------------------------------------------------------------- 1 | package com.jn.easyjson.core; 2 | 3 | /** 4 | * @since 3.1.8 5 | */ 6 | public abstract class JsonHandlerAdapter implements JsonHandler { 7 | private Delegate delegate; 8 | private JSONBuilder jsonBuilder; 9 | public void setDelegate(Delegate delegate) { 10 | this.delegate = delegate; 11 | } 12 | 13 | public Delegate getDelegate() { 14 | return delegate; 15 | } 16 | 17 | public JSONBuilder getJsonBuilder(){ 18 | return this.jsonBuilder; 19 | } 20 | 21 | public void setJsonBuilder(JSONBuilder jsonBuilder){ 22 | this.jsonBuilder = jsonBuilder; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /easyjson-core/src/main/java/com/jn/easyjson/core/annotation/DependOn.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 the original author or authors. 3 | * 4 | * Licensed under the Apache, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at http://www.gnu.org/licenses/lgpl-3.0.html 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | package com.jn.easyjson.core.annotation; 16 | 17 | import java.lang.annotation.Retention; 18 | import java.lang.annotation.RetentionPolicy; 19 | import java.lang.annotation.Target; 20 | 21 | import static java.lang.annotation.ElementType.TYPE; 22 | 23 | @Retention(RetentionPolicy.RUNTIME) 24 | @Target({TYPE}) 25 | public @interface DependOn { 26 | String value(); 27 | } 28 | -------------------------------------------------------------------------------- /easyjson-core/src/main/java/com/jn/easyjson/core/annotation/Ignore.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 the original author or authors. 3 | * 4 | * Licensed under the Apache, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at http://www.gnu.org/licenses/lgpl-3.0.html 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | package com.jn.easyjson.core.annotation; 16 | 17 | import java.lang.annotation.Retention; 18 | import java.lang.annotation.RetentionPolicy; 19 | import java.lang.annotation.Target; 20 | 21 | import static java.lang.annotation.ElementType.FIELD; 22 | 23 | @Retention(RetentionPolicy.RUNTIME) 24 | @Target({FIELD}) 25 | public @interface Ignore { 26 | boolean write() default true; 27 | 28 | boolean read() default true; 29 | } 30 | -------------------------------------------------------------------------------- /easyjson-core/src/main/java/com/jn/easyjson/core/bean/propertynaming/BeanPropertyNamingPolicy.java: -------------------------------------------------------------------------------- 1 | package com.jn.easyjson.core.bean.propertynaming; 2 | 3 | import com.jn.langx.Named; 4 | import com.jn.langx.annotation.Nullable; 5 | 6 | import java.lang.reflect.Member; 7 | 8 | /** 9 | * @since 3.2.2 10 | */ 11 | public interface BeanPropertyNamingPolicy extends Named { 12 | 13 | /** 14 | * Translates the field name into its JSON field name representation. 15 | * 16 | * @param property the field object that we are translating 17 | * @return the translated field name. 18 | * @since 3.2.0 19 | */ 20 | String translateName(@Nullable Member member, String property); 21 | } 22 | -------------------------------------------------------------------------------- /easyjson-core/src/main/java/com/jn/easyjson/core/bean/propertynaming/BeanPropertyNamingPolicyRegistry.java: -------------------------------------------------------------------------------- 1 | package com.jn.easyjson.core.bean.propertynaming; 2 | 3 | import com.jn.langx.lifecycle.InitializationException; 4 | import com.jn.langx.registry.GenericRegistry; 5 | import com.jn.langx.util.collection.Collects; 6 | import com.jn.langx.util.function.Consumer; 7 | 8 | import java.util.ServiceLoader; 9 | 10 | /** 11 | * @since 3.2.2 12 | */ 13 | public class BeanPropertyNamingPolicyRegistry extends GenericRegistry { 14 | 15 | public BeanPropertyNamingPolicyRegistry() { 16 | init(); 17 | } 18 | 19 | @Override 20 | protected void doInit() throws InitializationException { 21 | Collects.forEach(ServiceLoader.load(BeanPropertyNamingPolicy.class), new Consumer() { 22 | @Override 23 | public void accept(BeanPropertyNamingPolicy fieldNamingPolicy) { 24 | register(fieldNamingPolicy); 25 | } 26 | }); 27 | } 28 | 29 | public static final BeanPropertyNamingPolicyRegistry INSTANCE = new BeanPropertyNamingPolicyRegistry(); 30 | } 31 | -------------------------------------------------------------------------------- /easyjson-core/src/main/java/com/jn/easyjson/core/bean/propertynaming/IdentityPropertyNamingPolicy.java: -------------------------------------------------------------------------------- 1 | package com.jn.easyjson.core.bean.propertynaming; 2 | 3 | import java.lang.reflect.Member; 4 | 5 | /** 6 | * @since 3.2.2 7 | */ 8 | public class IdentityPropertyNamingPolicy implements BeanPropertyNamingPolicy { 9 | @Override 10 | public String translateName(Member member, String property) { 11 | return property; 12 | } 13 | 14 | @Override 15 | public String getName() { 16 | return "identity"; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /easyjson-core/src/main/java/com/jn/easyjson/core/bean/propertynaming/UpperCamelCasePropertyNamingPolicy.java: -------------------------------------------------------------------------------- 1 | package com.jn.easyjson.core.bean.propertynaming; 2 | 3 | import com.jn.langx.util.Strings; 4 | 5 | import java.lang.reflect.Member; 6 | 7 | /** 8 | * @since 3.2.2 9 | */ 10 | public class UpperCamelCasePropertyNamingPolicy implements BeanPropertyNamingPolicy { 11 | @Override 12 | public String translateName(Member member, String property) { 13 | return Strings.upperCaseFirstLetter(property); 14 | } 15 | 16 | @Override 17 | public String getName() { 18 | return "UpperCamelCase"; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /easyjson-core/src/main/java/com/jn/easyjson/core/codec/dialect/AnnotatedElementCodecConfigurationParser.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 the original author or authors. 3 | * 4 | * Licensed under the Apache, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at http://www.gnu.org/licenses/lgpl-3.0.html 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | package com.jn.easyjson.core.codec.dialect; 16 | 17 | import com.jn.langx.configuration.ConfigurationParser; 18 | 19 | import java.lang.reflect.AnnotatedElement; 20 | 21 | public interface AnnotatedElementCodecConfigurationParser extends ConfigurationParser { 22 | @Override 23 | public T parse(AnnotatedElement annotatedElement); 24 | } 25 | -------------------------------------------------------------------------------- /easyjson-core/src/main/java/com/jn/easyjson/core/codec/dialect/BeanClassAnnotatedCodecConfigurationParser.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 the original author or authors. 3 | * 4 | * Licensed under the Apache, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at http://www.gnu.org/licenses/lgpl-3.0.html 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | package com.jn.easyjson.core.codec.dialect; 16 | 17 | import java.lang.reflect.AnnotatedElement; 18 | 19 | public interface BeanClassAnnotatedCodecConfigurationParser extends AnnotatedElementCodecConfigurationParser { 20 | @Override 21 | ClassCodecConfiguration parse(AnnotatedElement annotatedElement); 22 | } 23 | -------------------------------------------------------------------------------- /easyjson-core/src/main/java/com/jn/easyjson/core/codec/dialect/BeanPropertyAnnotatedCodecConfigurationParser.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 the original author or authors. 3 | * 4 | * Licensed under the Apache, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at http://www.gnu.org/licenses/lgpl-3.0.html 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | package com.jn.easyjson.core.codec.dialect; 16 | 17 | import java.lang.reflect.AnnotatedElement; 18 | 19 | public interface BeanPropertyAnnotatedCodecConfigurationParser extends AnnotatedElementCodecConfigurationParser{ 20 | @Override 21 | public PropertyCodecConfiguration parse(AnnotatedElement annotatedElement); 22 | } 23 | -------------------------------------------------------------------------------- /easyjson-core/src/main/java/com/jn/easyjson/core/codec/dialect/BeanPropertyFinder.java: -------------------------------------------------------------------------------- 1 | package com.jn.easyjson.core.codec.dialect; 2 | 3 | import com.jn.langx.util.function.Function2; 4 | 5 | public interface BeanPropertyFinder extends Function2 { 6 | @Override 7 | String apply(Class declaringClass, String propertyName); 8 | } 9 | -------------------------------------------------------------------------------- /easyjson-core/src/main/java/com/jn/easyjson/core/codec/dialect/ClassLoaderCodecConfigurationRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 the original author or authors. 3 | * 4 | * Licensed under the Apache, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at http://www.gnu.org/licenses/lgpl-3.0.html 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | package com.jn.easyjson.core.codec.dialect; 16 | 17 | import com.jn.langx.configuration.AbstractConfigurationRepository; 18 | import com.jn.langx.configuration.ConfigurationWriter; 19 | 20 | public class ClassLoaderCodecConfigurationRepository extends AbstractConfigurationRepository, ConfigurationWriter> { 21 | } 22 | -------------------------------------------------------------------------------- /easyjson-core/src/main/java/com/jn/easyjson/core/codec/dialect/FakeBootstrapClassLoader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 the original author or authors. 3 | * 4 | * Licensed under the Apache, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at http://www.gnu.org/licenses/lgpl-3.0.html 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | package com.jn.easyjson.core.codec.dialect; 16 | 17 | import com.jn.langx.annotation.Singleton; 18 | 19 | @Singleton 20 | public class FakeBootstrapClassLoader extends ClassLoader { 21 | private static final FakeBootstrapClassLoader INSTANCE = new FakeBootstrapClassLoader(); 22 | 23 | private FakeBootstrapClassLoader() { 24 | } 25 | 26 | public static FakeBootstrapClassLoader getInstance() { 27 | return INSTANCE; 28 | } 29 | 30 | @Override 31 | public String toString() { 32 | return "FakeBootStrapClassLoader"; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /easyjson-core/src/main/java/com/jn/easyjson/core/codec/dialect/PropertyCodecConfigurationMerger.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 the original author or authors. 3 | * 4 | * Licensed under the Apache, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at http://www.gnu.org/licenses/lgpl-3.0.html 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | package com.jn.easyjson.core.codec.dialect; 16 | 17 | public interface PropertyCodecConfigurationMerger { 18 | public void merge(PropertyCodecConfiguration baseConfiguration, PropertyCodecConfiguration newConfiguration); 19 | } 20 | -------------------------------------------------------------------------------- /easyjson-core/src/main/java/com/jn/easyjson/core/codec/dialect/PropertyIdGenerator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 the original author or authors. 3 | * 4 | * Licensed under the Apache, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at http://www.gnu.org/licenses/lgpl-3.0.html 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | package com.jn.easyjson.core.codec.dialect; 16 | 17 | import com.jn.langx.IdGenerator; 18 | 19 | /** 20 | * @inheritDoc 21 | */ 22 | public class PropertyIdGenerator implements IdGenerator { 23 | @Override 24 | public String get(String propertyName) { 25 | return propertyName; 26 | } 27 | 28 | @Override 29 | public String get() { 30 | return null; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /easyjson-core/src/main/java/com/jn/easyjson/core/codec/dialect/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 the original author or authors. 3 | * 4 | * Licensed under the Apache, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at http://www.gnu.org/licenses/lgpl-3.0.html 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | /** 16 | * 这个包是用于 xxxJson-to-easyjson 时,指定特有的注解解析器用的。 17 | */ 18 | package com.jn.easyjson.core.codec.dialect; 19 | 20 | -------------------------------------------------------------------------------- /easyjson-core/src/main/java/com/jn/easyjson/core/exclusion/UnderlineStartedExclusion.java: -------------------------------------------------------------------------------- 1 | package com.jn.easyjson.core.exclusion; 2 | 3 | import com.jn.langx.util.reflect.FieldAttributes; 4 | import com.jn.langx.util.reflect.MethodAttributes; 5 | 6 | public final class UnderlineStartedExclusion implements Exclusion { 7 | @Override 8 | public boolean shouldSkipMethod(MethodAttributes m, boolean serialize) { 9 | return false; 10 | } 11 | 12 | @Override 13 | public boolean shouldSkipField(FieldAttributes fieldAttributes, boolean serialize) { 14 | String fieldName = fieldAttributes.getName(); 15 | if (fieldName.startsWith("_")) { 16 | return true; 17 | } 18 | return false; 19 | } 20 | 21 | @Override 22 | public boolean shouldSkipClass(Class aClass, boolean serialize) { 23 | return false; 24 | } 25 | 26 | @Override 27 | public int hashCode() { 28 | return 2; 29 | } 30 | 31 | @Override 32 | public boolean equals(Object obj) { 33 | return obj instanceof UnderlineStartedExclusion; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /easyjson-core/src/main/java/com/jn/easyjson/core/factory/JsonScope.java: -------------------------------------------------------------------------------- 1 | package com.jn.easyjson.core.factory; 2 | 3 | public enum JsonScope { 4 | SINGLETON, 5 | PROTOTYPE; 6 | } 7 | -------------------------------------------------------------------------------- /easyjson-core/src/main/java/com/jn/easyjson/core/factory/PrototypeJSONFactory.java: -------------------------------------------------------------------------------- 1 | package com.jn.easyjson.core.factory; 2 | 3 | import com.jn.easyjson.core.JSON; 4 | import com.jn.easyjson.core.JSONBuilder; 5 | import com.jn.easyjson.core.JSONFactory; 6 | 7 | public class PrototypeJSONFactory implements JSONFactory { 8 | private JSONBuilder jsonBuilder; 9 | 10 | public PrototypeJSONFactory(JSONBuilder jsonBuilder){ 11 | setJSONBuilder(jsonBuilder); 12 | } 13 | 14 | @Override 15 | public void setJSONBuilder(JSONBuilder jsonBuilder) { 16 | this.jsonBuilder = jsonBuilder; 17 | } 18 | 19 | @Override 20 | public JSONBuilder getJSONBuilder() { 21 | return jsonBuilder; 22 | } 23 | 24 | @Override 25 | public JSON get() { 26 | return jsonBuilder.build(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /easyjson-core/src/main/java/com/jn/easyjson/core/factory/SingletonJSONFactory.java: -------------------------------------------------------------------------------- 1 | package com.jn.easyjson.core.factory; 2 | 3 | import com.jn.easyjson.core.JSON; 4 | import com.jn.easyjson.core.JSONBuilder; 5 | import com.jn.easyjson.core.JSONFactory; 6 | 7 | public class SingletonJSONFactory implements JSONFactory { 8 | private JSONBuilder jsonBuilder; 9 | private JSON json; 10 | 11 | public SingletonJSONFactory(JSONBuilder jsonBuilder) { 12 | setJSONBuilder(jsonBuilder); 13 | } 14 | 15 | @Override 16 | public void setJSONBuilder(JSONBuilder jsonBuilder) { 17 | this.jsonBuilder = jsonBuilder; 18 | } 19 | 20 | @Override 21 | public JSONBuilder getJSONBuilder() { 22 | return jsonBuilder; 23 | } 24 | 25 | @Override 26 | public JSON get() { 27 | if (json == null) { 28 | synchronized (this) { 29 | if (json == null) { 30 | json = this.jsonBuilder.build(); 31 | } 32 | } 33 | } 34 | return json; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /easyjson-core/src/main/java/com/jn/easyjson/core/node/ToJsonTreeNodeMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 the original author or authors. 3 | * 4 | * Licensed under the Apache, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at http://www.gnu.org/licenses/lgpl-3.0.html 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | package com.jn.easyjson.core.node; 16 | 17 | import com.jn.easyjson.core.JsonTreeNode; 18 | import com.jn.langx.annotation.NonNull; 19 | import com.jn.langx.annotation.Nullable; 20 | 21 | /** 22 | * 和JsonTreeNodes 配合使用,用来自定义如何将一个对象转换为JsonTreeNode 23 | */ 24 | public interface ToJsonTreeNodeMapper { 25 | 26 | JsonTreeNode mapping(@Nullable Object object); 27 | 28 | boolean isAcceptable(@NonNull Object object); 29 | } 30 | -------------------------------------------------------------------------------- /easyjson-core/src/main/java/com/jn/easyjson/core/node/ToXxxJsonMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 the original author or authors. 3 | * 4 | * Licensed under the Apache, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at http://www.gnu.org/licenses/lgpl-3.0.html 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | package com.jn.easyjson.core.node; 16 | 17 | /** 18 | * mapping a tree node to any Java Object, or Custom JSONObject, JSONArray, JSONNull etc... 19 | */ 20 | public interface ToXxxJsonMapper { 21 | JSONNull mappingNull(JsonNullNode node); 22 | 23 | JSONPrimitive mappingPrimitive(JsonPrimitiveNode node); 24 | 25 | JSONArray mappingArray(JsonArrayNode node); 26 | 27 | JSONObject mappingObject(JsonObjectNode node); 28 | } 29 | -------------------------------------------------------------------------------- /easyjson-core/src/main/java/com/jn/easyjson/core/tree/JsonReaderInternalAccess.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 the original author or authors. 3 | * 4 | * Licensed under the Apache, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at http://www.gnu.org/licenses/lgpl-3.0.html 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | package com.jn.easyjson.core.tree; 16 | 17 | 18 | import com.jn.easyjson.core.tree.stream.JsonReader; 19 | 20 | import java.io.IOException; 21 | 22 | /** 23 | * Internal-only APIs of JsonReader available only to other classes in JSON. 24 | */ 25 | public abstract class JsonReaderInternalAccess { 26 | public static JsonReaderInternalAccess INSTANCE; 27 | 28 | /** 29 | * Changes the type of the current property name token to a string value. 30 | */ 31 | public abstract void promoteNameToValue(JsonReader reader) throws IOException; 32 | } 33 | -------------------------------------------------------------------------------- /easyjson-core/src/main/resources/META-INF/services/com.jn.easyjson.core.bean.propertynaming.BeanPropertyNamingPolicy: -------------------------------------------------------------------------------- 1 | com.jn.easyjson.core.bean.propertynaming.IdentityPropertyNamingPolicy 2 | com.jn.easyjson.core.bean.propertynaming.UpperCamelCasePropertyNamingPolicy -------------------------------------------------------------------------------- /easyjson-fastjson/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | io.github.bes2008.solution.easyjson 8 | easyjson 9 | 4.1.6 10 | 11 | 4.0.0 12 | 13 | easyjson-fastjson 14 | ${project.groupId}:${project.artifactId}:${project.version} 15 | 16 | Adapter easyjson to Alibaba fastjson 17 | 18 | 19 | 20 | 21 | com.alibaba 22 | fastjson 23 | provided 24 | 25 | 26 | io.github.bes2008.solution.easyjson 27 | easyjson-core 28 | 29 | 30 | -------------------------------------------------------------------------------- /easyjson-fastjson/src/main/java/com/jn/easyjson/fastjson/codec/Typed.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 the original author or authors. 3 | * 4 | * Licensed under the Apache, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at http://www.gnu.org/licenses/lgpl-3.0.html 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | package com.jn.easyjson.fastjson.codec; 16 | 17 | import java.lang.reflect.Type; 18 | import java.util.List; 19 | 20 | public interface Typed { 21 | List applyTo(); 22 | } 23 | -------------------------------------------------------------------------------- /easyjson-fastjson/src/main/java/com/jn/easyjson/fastjson/ext/FieldInfos.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 the original author or authors. 3 | * 4 | * Licensed under the Apache, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at http://www.gnu.org/licenses/lgpl-3.0.html 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | package com.jn.easyjson.fastjson.ext; 16 | 17 | import com.alibaba.fastjson.util.FieldInfo; 18 | import com.jn.langx.annotation.NonNull; 19 | import com.jn.langx.util.Preconditions; 20 | 21 | public class FieldInfos { 22 | public static boolean isMethod(@NonNull FieldInfo info) { 23 | Preconditions.checkNotNull(info); 24 | return info.field == null && info.method != null; 25 | } 26 | 27 | public static boolean isField(@NonNull FieldInfo info) { 28 | Preconditions.checkNotNull(info); 29 | return info.field != null; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /easyjson-fastjson/src/main/java/com/jn/easyjson/fastjson/filter/namefilter/FastjsonPropertyNamingFilter.java: -------------------------------------------------------------------------------- 1 | package com.jn.easyjson.fastjson.filter.namefilter; 2 | 3 | import com.alibaba.fastjson.serializer.NameFilter; 4 | import com.jn.easyjson.core.bean.propertynaming.BeanPropertyNamingPolicy; 5 | /** 6 | * @since 3.2.2 7 | */ 8 | public class FastjsonPropertyNamingFilter implements NameFilter { 9 | private BeanPropertyNamingPolicy policy; 10 | 11 | public FastjsonPropertyNamingFilter(BeanPropertyNamingPolicy propertyNamingPolicy) { 12 | this.policy = propertyNamingPolicy; 13 | } 14 | 15 | @Override 16 | public String process(Object object, String property, Object fieldValue) { 17 | return this.policy.translateName(null, property); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /easyjson-fastjson/src/main/java/com/jn/easyjson/fastjson/filter/readme.md: -------------------------------------------------------------------------------- 1 | # Fastjson Filter 2 | 3 | 有几大类过滤,它们的作用分别是: 4 | 5 | ``` 6 | PropertyPreFilter:根据 PropertyName 判断是否序列化 7 | PropertyFilter:根据 PropertyName 和 PropertyValue 来判断是否序列化 8 | 9 | NameFilter: 用于对JavaBean的属性名进行处理。譬如说 首字母大写,驼峰命名法 10 | ValueFilter: 用于对 Java Bean的值进行处理 11 | 12 | BeforeFilter:序列化时在最前添加内容 13 | AfterFilter:序列化时在最后添加内容 14 | 15 | ``` 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /easyjson-fastjson/src/main/resources/META-INF/services/com.jn.easyjson.core.JSONBuilder: -------------------------------------------------------------------------------- 1 | com.jn.easyjson.fastjson.FastJsonJSONBuilder -------------------------------------------------------------------------------- /easyjson-gson/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | io.github.bes2008.solution.easyjson 8 | easyjson 9 | 4.1.6 10 | 11 | 4.0.0 12 | 13 | easyjson-gson 14 | ${project.groupId}:${project.artifactId}:${project.version} 15 | 16 | Adapter easyjson to Google Gson 17 | 18 | 19 | 20 | 21 | io.github.bes2008.solution.easyjson 22 | easyjson-core 23 | 24 | 25 | 26 | com.google.code.gson 27 | gson 28 | provided 29 | 30 | 31 | -------------------------------------------------------------------------------- /easyjson-gson/src/main/java/com/jn/easyjson/gson/bean/fieldnaming/GsonFieldNamingStrategyAdapter.java: -------------------------------------------------------------------------------- 1 | package com.jn.easyjson.gson.bean.fieldnaming; 2 | 3 | import com.google.gson.FieldNamingStrategy; 4 | import com.jn.easyjson.core.bean.propertynaming.BeanPropertyNamingPolicy; 5 | 6 | import java.lang.reflect.Field; 7 | 8 | /** 9 | * @since 3.2.2 10 | */ 11 | public class GsonFieldNamingStrategyAdapter implements FieldNamingStrategy { 12 | private BeanPropertyNamingPolicy delegate; 13 | 14 | public GsonFieldNamingStrategyAdapter(BeanPropertyNamingPolicy policy) { 15 | this.delegate = policy; 16 | } 17 | 18 | @Override 19 | public String translateName(Field f) { 20 | return this.delegate.translateName(f, f.getName()); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /easyjson-gson/src/main/java/com/jn/easyjson/gson/typeadapter/BytesTypeAdapterFactory.java: -------------------------------------------------------------------------------- 1 | package com.jn.easyjson.gson.typeadapter; 2 | 3 | import com.google.gson.Gson; 4 | import com.google.gson.TypeAdapter; 5 | import com.google.gson.reflect.TypeToken; 6 | import com.jn.easyjson.gson.GsonJSONBuilder; 7 | import com.jn.langx.util.collection.Collects; 8 | 9 | import java.util.List; 10 | 11 | public class BytesTypeAdapterFactory extends EasyjsonAbstractTypeAdapterFactory{ 12 | 13 | private static final List supportedClasses = Collects.newArrayList(byte[].class, Byte[].class); 14 | 15 | public BytesTypeAdapterFactory(GsonJSONBuilder jsonBuilder){ 16 | super(jsonBuilder); 17 | } 18 | @Override 19 | public TypeAdapter create(Gson gson, TypeToken type) { 20 | if (jsonBuilder != null && jsonBuilder.serializeBytesAsBase64String()) { 21 | if (supportedClasses.contains(type.getRawType())) { 22 | BytesTypeAdapter adapter = new BytesTypeAdapter(); 23 | adapter.setJSONBuilder(jsonBuilder); 24 | return adapter; 25 | } 26 | } 27 | return null; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /easyjson-gson/src/main/java/com/jn/easyjson/gson/typeadapter/CalendarTypeAdapterFactory.java: -------------------------------------------------------------------------------- 1 | package com.jn.easyjson.gson.typeadapter; 2 | 3 | import com.google.gson.Gson; 4 | import com.google.gson.TypeAdapter; 5 | import com.google.gson.reflect.TypeToken; 6 | import com.jn.easyjson.gson.GsonJSONBuilder; 7 | import com.jn.langx.util.reflect.Reflects; 8 | 9 | import java.util.Calendar; 10 | import java.util.Date; 11 | 12 | public class CalendarTypeAdapterFactory extends EasyjsonAbstractTypeAdapterFactory{ 13 | private DateTypeAdapterFactory dateTypeAdapterFactory; 14 | 15 | public CalendarTypeAdapterFactory(GsonJSONBuilder jsonBuilder) { 16 | super(jsonBuilder); 17 | this.dateTypeAdapterFactory = new DateTypeAdapterFactory(jsonBuilder); 18 | } 19 | 20 | @Override 21 | public TypeAdapter create(Gson gson, TypeToken type) { 22 | if (Reflects.isSubClassOrEquals(Calendar.class, type.getRawType())) { 23 | DateTypeAdapter dateTypeAdapter = (DateTypeAdapter) dateTypeAdapterFactory.create(gson, TypeToken.get(Date.class)); 24 | CalendarTypeAdapter adapter = new CalendarTypeAdapter(); 25 | adapter.setJSONBuilder(jsonBuilder); 26 | adapter.setDateTypeAdapter(dateTypeAdapter); 27 | return adapter; 28 | } 29 | return null; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /easyjson-gson/src/main/java/com/jn/easyjson/gson/typeadapter/ClassAware.java: -------------------------------------------------------------------------------- 1 | package com.jn.easyjson.gson.typeadapter; 2 | 3 | public interface ClassAware { 4 | void setClass(Class cls); 5 | Class getDataClass(); 6 | } 7 | -------------------------------------------------------------------------------- /easyjson-gson/src/main/java/com/jn/easyjson/gson/typeadapter/EasyjsonAbstractTypeAdapterFactory.java: -------------------------------------------------------------------------------- 1 | package com.jn.easyjson.gson.typeadapter; 2 | 3 | import com.google.gson.TypeAdapterFactory; 4 | import com.jn.easyjson.gson.GsonJSONBuilder; 5 | import com.jn.langx.util.Preconditions; 6 | 7 | public abstract class EasyjsonAbstractTypeAdapterFactory implements TypeAdapterFactory { 8 | protected GsonJSONBuilder jsonBuilder; 9 | public EasyjsonAbstractTypeAdapterFactory(GsonJSONBuilder jsonBuilder){ 10 | Preconditions.checkNotNull(jsonBuilder); 11 | this.jsonBuilder = jsonBuilder; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /easyjson-gson/src/main/java/com/jn/easyjson/gson/typeadapter/FieldAware.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 the original author or authors. 3 | * 4 | * Licensed under the Apache, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at http://www.gnu.org/licenses/lgpl-3.0.html 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | package com.jn.easyjson.gson.typeadapter; 16 | 17 | import java.lang.reflect.Field; 18 | 19 | public interface FieldAware extends ClassAware{ 20 | void setField(Field field); 21 | } 22 | -------------------------------------------------------------------------------- /easyjson-gson/src/main/java/com/jn/easyjson/gson/typeadapter/MultiValueMapTypeAdapterFactory.java: -------------------------------------------------------------------------------- 1 | package com.jn.easyjson.gson.typeadapter; 2 | 3 | import com.google.gson.Gson; 4 | import com.google.gson.TypeAdapter; 5 | import com.google.gson.TypeAdapterFactory; 6 | import com.google.gson.reflect.TypeToken; 7 | import com.jn.langx.util.collection.multivalue.MultiValueMap; 8 | import com.jn.langx.util.reflect.type.Types; 9 | 10 | import java.lang.reflect.Type; 11 | import java.util.Map; 12 | 13 | public class MultiValueMapTypeAdapterFactory implements TypeAdapterFactory { 14 | 15 | @Override 16 | public TypeAdapter create(Gson gson, TypeToken typeToken) { 17 | Class rawType = typeToken.getRawType(); 18 | if (!MultiValueMap.class.isAssignableFrom(rawType)) { 19 | return null; 20 | } 21 | 22 | Type type = typeToken.getType(); 23 | Class rawTypeOfSrc = Types.getRawType(type); 24 | Type[] keyAndValueTypes = Types.getMapKeyAndValueTypes(type, rawTypeOfSrc); 25 | 26 | TypeToken delegateTypeToken = TypeToken.getParameterized(Map.class, keyAndValueTypes); 27 | TypeAdapter delegateTypeAdapter = gson.getAdapter(delegateTypeToken); 28 | 29 | 30 | return new MultiValueMapTypeAdapter(delegateTypeAdapter, typeToken); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /easyjson-gson/src/main/resources/META-INF/services/com.jn.easyjson.core.JSONBuilder: -------------------------------------------------------------------------------- 1 | com.jn.easyjson.gson.GsonJSONBuilder -------------------------------------------------------------------------------- /easyjson-jackson/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | io.github.bes2008.solution.easyjson 8 | easyjson 9 | 4.1.6 10 | 11 | 4.0.0 12 | 13 | easyjson-jackson 14 | ${project.groupId}:${project.artifactId}:${project.version} 15 | 16 | 17 | Adapter easyjson to Jackson 18 | 19 | 20 | 21 | com.fasterxml.jackson.core 22 | jackson-databind 23 | 26 | 2.7.0 27 | provided 28 | 29 | 30 | io.github.bes2008.solution.easyjson 31 | easyjson-core 32 | 33 | 34 | -------------------------------------------------------------------------------- /easyjson-jackson/src/main/java/com/jn/easyjson/jackson/DateSeries.java: -------------------------------------------------------------------------------- 1 | package com.jn.easyjson.jackson; 2 | 3 | import com.jn.langx.util.collection.Collects; 4 | import com.jn.langx.util.reflect.Reflects; 5 | 6 | import java.sql.Timestamp; 7 | import java.util.Calendar; 8 | import java.util.Date; 9 | import java.util.GregorianCalendar; 10 | import java.util.List; 11 | 12 | public class DateSeries { 13 | 14 | private static List supportedDateTypes = Collects.newArrayList( 15 | Date.class, 16 | java.sql.Date.class, 17 | Timestamp.class, 18 | Calendar.class, 19 | GregorianCalendar.class 20 | ); 21 | 22 | public static boolean isSupported(Class type) { 23 | return Reflects.isSubClassOrEquals(Date.class, type) 24 | || Reflects.isSubClassOrEquals(Calendar.class, type) 25 | || supportedDateTypes.contains(type); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /easyjson-jackson/src/main/java/com/jn/easyjson/jackson/deserializer/ContextualDeserializer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 the original author or authors. 3 | * 4 | * Licensed under the Apache, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at http://www.gnu.org/licenses/lgpl-3.0.html 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | package com.jn.easyjson.jackson.deserializer; 16 | 17 | import com.fasterxml.jackson.databind.BeanProperty; 18 | import com.fasterxml.jackson.databind.DeserializationContext; 19 | import com.fasterxml.jackson.databind.JsonDeserializer; 20 | import com.fasterxml.jackson.databind.JsonMappingException; 21 | 22 | public interface ContextualDeserializer { 23 | JsonDeserializer createContextual(DeserializationContext context, BeanProperty beanProperty, Class type) throws JsonMappingException; 24 | } 25 | -------------------------------------------------------------------------------- /easyjson-jackson/src/main/java/com/jn/easyjson/jackson/exception/UnsupportedKeyTypeException.java: -------------------------------------------------------------------------------- 1 | package com.jn.easyjson.jackson.exception; 2 | 3 | public class UnsupportedKeyTypeException extends RuntimeException { 4 | 5 | public UnsupportedKeyTypeException() { 6 | super(); 7 | } 8 | 9 | /** 10 | * Constructs a new runtime exception with the specified detail message. 11 | * The cause is not initialized, and may subsequently be initialized by a 12 | * call to {@link #initCause}. 13 | * 14 | * @param message the detail message. The detail message is saved for 15 | * later retrieval by the {@link #getMessage()} method. 16 | */ 17 | public UnsupportedKeyTypeException(String message) { 18 | super(message); 19 | } 20 | 21 | public UnsupportedKeyTypeException(String message, Throwable cause) { 22 | super(message, cause); 23 | } 24 | 25 | public UnsupportedKeyTypeException(Throwable cause) { 26 | super(cause); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /easyjson-jackson/src/main/java/com/jn/easyjson/jackson/ext/ArrayCommaException.java: -------------------------------------------------------------------------------- 1 | package com.jn.easyjson.jackson.ext; 2 | 3 | import com.fasterxml.jackson.core.JsonLocation; 4 | import com.fasterxml.jackson.core.JsonParseException; 5 | 6 | /** 7 | * 为处理数组中的 , 后面没有值的情况加的 8 | */ 9 | public class ArrayCommaException extends JsonParseException { 10 | public ArrayCommaException(String msg, JsonLocation loc) { 11 | super(msg, loc); 12 | } 13 | 14 | public ArrayCommaException(String msg, JsonLocation loc, Throwable root) { 15 | super(msg, loc, root); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /easyjson-jackson/src/main/java/com/jn/easyjson/jackson/ext/EasyjsonJsonFactory.java: -------------------------------------------------------------------------------- 1 | package com.jn.easyjson.jackson.ext; 2 | 3 | import com.fasterxml.jackson.core.JsonFactory; 4 | import com.fasterxml.jackson.core.JsonParser; 5 | import com.fasterxml.jackson.core.io.IOContext; 6 | 7 | import java.io.IOException; 8 | import java.io.Reader; 9 | 10 | /** 11 | * 为处理数组中的 , 后面没有值的情况加的 12 | */ 13 | public class EasyjsonJsonFactory extends JsonFactory { 14 | 15 | @Override 16 | protected JsonParser _createParser(Reader r, IOContext ctxt) throws IOException { 17 | return new EasyjsonJsonParser(new EasyjsonReaderBasedJsonParser(ctxt, _parserFeatures, r, _objectCodec, 18 | _rootCharSymbols.makeChild(_factoryFeatures))); 19 | } 20 | 21 | @Override 22 | protected JsonParser _createParser(char[] data, int offset, int len, IOContext ctxt, boolean recyclable) throws IOException { 23 | return new EasyjsonJsonParser(new EasyjsonReaderBasedJsonParser(ctxt, _parserFeatures, null, _objectCodec, 24 | _rootCharSymbols.makeChild(_factoryFeatures), 25 | data, offset, offset+len, recyclable)); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /easyjson-jackson/src/main/java/com/jn/easyjson/jackson/ext/EasyjsonJsonParser.java: -------------------------------------------------------------------------------- 1 | package com.jn.easyjson.jackson.ext; 2 | 3 | import com.fasterxml.jackson.core.JsonParser; 4 | import com.fasterxml.jackson.core.JsonToken; 5 | import com.fasterxml.jackson.core.util.JsonParserDelegate; 6 | 7 | import java.io.IOException; 8 | 9 | /** 10 | * 为处理数组中的 , 后面没有值的情况加的 11 | */ 12 | public class EasyjsonJsonParser extends JsonParserDelegate { 13 | public EasyjsonJsonParser(JsonParser d) { 14 | super(d); 15 | } 16 | 17 | @Override 18 | public JsonToken nextToken() throws IOException { 19 | try { 20 | return super.nextToken(); 21 | }catch (ArrayCommaException e){ 22 | JsonToken jsonToken = nextToken(); 23 | return jsonToken; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /easyjson-jackson/src/main/java/com/jn/easyjson/jackson/ext/JacksonSetterConflictSelector.java: -------------------------------------------------------------------------------- 1 | package com.jn.easyjson.jackson.ext; 2 | 3 | import com.jn.langx.Named; 4 | import com.jn.langx.annotation.Nullable; 5 | 6 | import java.lang.reflect.Method; 7 | 8 | public interface JacksonSetterConflictSelector extends Named { 9 | @Nullable 10 | public Method select(Method setter1, final Method setter2); 11 | } 12 | -------------------------------------------------------------------------------- /easyjson-jackson/src/main/java/com/jn/easyjson/jackson/serializer/NullSerializer.java: -------------------------------------------------------------------------------- 1 | package com.jn.easyjson.jackson.serializer; 2 | 3 | import com.fasterxml.jackson.core.JsonGenerator; 4 | import com.fasterxml.jackson.databind.JsonSerializer; 5 | import com.fasterxml.jackson.databind.SerializerProvider; 6 | 7 | import java.io.IOException; 8 | 9 | public class NullSerializer extends JsonSerializer { 10 | @Override 11 | public void serialize(Object value, JsonGenerator gen, SerializerProvider serializers) throws IOException { 12 | gen.writeNull(); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /easyjson-jackson/src/main/resources/META-INF/services/com.jn.easyjson.core.JSONBuilder: -------------------------------------------------------------------------------- 1 | com.jn.easyjson.jackson.JacksonJSONBuilder -------------------------------------------------------------------------------- /easyjson-supports-jsonpath/src/main/java/com/jn/easyjson/supports/jsonpath/EasyjsonDefaults.java: -------------------------------------------------------------------------------- 1 | package com.jn.easyjson.supports.jsonpath; 2 | 3 | import com.jayway.jsonpath.Configuration; 4 | import com.jayway.jsonpath.Option; 5 | import com.jayway.jsonpath.spi.json.JsonProvider; 6 | import com.jayway.jsonpath.spi.mapper.MappingProvider; 7 | 8 | import java.util.EnumSet; 9 | import java.util.Set; 10 | 11 | public class EasyjsonDefaults implements Configuration.Defaults { 12 | private static final EasyjsonProvider JSON_PROVIDER= new EasyjsonProvider(); 13 | private static final EasyjsonMappingProvider MAPPING_PROVIDER = new EasyjsonMappingProvider(); 14 | 15 | public static final EasyjsonDefaults INSTANCE = new EasyjsonDefaults(); 16 | 17 | 18 | 19 | @Override 20 | public JsonProvider jsonProvider() { 21 | return JSON_PROVIDER; 22 | } 23 | 24 | @Override 25 | public Set