Genson a fast & modular Java <> Json library

Related tags

JSON genson
Overview

Build Status

Genson

Join the chat at https://gitter.im/owlike/genson

Genson is a complete json <-> java conversion library, providing full databinding, streaming and much more.

Gensons main strengths?

  • Easy to use and just works!
  • Its modular and configurable architecture.
  • Speed and controlled small memory foot print making it scale.

Online Documentation

Checkout our new website - http://genson.io.

The old website at http://code.google.com/p/genson/, hosts the documentation and javadoc until release 0.99 inclusive. But starting with 1.0 everything has been moved to github and the new website.

Motivation

Why create another Json databinding library for Java? Many libraries lack either important features or the flexibility to add new ones. As Genson is being developed with such issues in mind, it is easily customizable with support for user extentions, and it includes many useful features out-of-the-box.

Features you will like

  • Easy to use, fast, highly configurable, lightweight and all that into a single small jar!
  • Full databinding and streaming support for efficient read/write
  • Support for polymorphic types (able to deserialize to an unknown type)
  • Does not require a default no arg constructor and really passes the values not just null, encouraging immutability. It can even be used with factory methods instead of constructors!
  • Full support for generic types
  • Easy to filter/include properties without requiring the use of annotations or mixins
  • Genson provides a complete implementation of JSR 353
  • Starting with Genson 0.95 JAXB annotations and types are supported!
  • Automatic support for JSON in JAX-RS implementations
  • Serialization and Deserialization of maps with complex keys

Goals

  • Be as much extensible as possible by allowing users to add new features in a clean and easy way. Genson applies the philosophy that "We can not think of every use case, so give to users the ability to do it by them self in a easy way".
  • Provide an easy to use API.
  • Try to be as fast and scalable or even faster than the most performant librairies.
  • Full support of Java generics.
  • Provide the ability to work with classes of which you don't have the source code.
  • Provide an efficient streaming API.

Download

Genson is provided as an all-in-one solution but also natively supports a few extensions and integrations with other libraries such as JAX-RS implementations, Spring, Joda time, and Scala. These libraries are not included in Genson and won't be pulled transitively if you are using maven (they are marked as optional).

You can download Genson manually from maven central or add the dependency to your pom if you use Maven.

<dependency>
  <groupId>com.owlike</groupId>
  <artifactId>genson</artifactId>
  <version>{{latest_version}}</version>
</dependency>

You can also build it from the sources using Maven.

POJO databinding

The main entry point in Genson library is the Genson class. It provides methods to serialize Java objects to JSON and deserialize JSON streams to Java objects. Instances of Genson are immutable and thread safe, you should reuse them. In general the recommended way is to have a single instance per configuration type.

The common way to use Genson is to read JSON and map it to some POJO and vice versa, read the POJO and write JSON.

Genson genson = new Genson();

// read from a String, byte array, input stream or reader
Person person = genson.deserialize("{\"age\":28,\"name\":\"Foo\"}", Person.class);

String json = genson.serialize(person);
// or produce a byte array
byte[] jsonBytes = genson.serializeBytes(person);
// or serialize to a output stream or writer
genson.serialize(person, outputStream);

public class Person {
  public String name;
  public int age;
}

Java collections

But you can also work with standard Java collections such as Map and Lists. If you don't tell Genson what type to use, it will deserialize JSON Arrays to Java List and JSON Objects to Map, numbers to Long and Double.

Using Java standard types instead of POJO can be a easy way to start learning JSON. In that case you will deal only with List, Map, Long, Double, String, Boolean and null.

// will be deserialized to a list of maps
List<Object> persons = genson.deserialize("[{\"age\":28,\"name\":\"Foo\"}]", List.class);
// will produce same result as
Object persons = genson.deserialize("[{\"age\":28,\"name\":\"Foo\"}]", Object.class);

Instead of using the previous Person class we can use a Map. By default if you don't specify the type of the keys, Genson will deserialize to String and serialize using toString method of the key.

Map<String, Object> person = new HashMap<String, Object>() {{
  put("name", "Foo");
  put("age", 28);
}};

// {"age":28,"name":"Foo"}
String singlePersonJson = genson.serialize(person);
// will contain a long for the age and a String for the name
Map<String, Object> map = genson.deserialize(singlePersonJson, Map.class);

Deserialize generic types

You can also deserialize to generic types such as a list of Pojos.

String json = "[{\"age\":28,\"name\":\"Foo\"}]";

List<Person> persons = genson.deserialize(json, new GenericType<List<Person>>(){});

// or lets say we want to use something else than String as the keys of our Map.
Map<Integer, Object> map = genson.deserialize(
  "{\"1\":28, \"2\":\"Foo\"}",
  new GenericType<Map<Integer, Object>>(){}
);

Note in the previous example we defined the keys (1, 2) as json strings. JSON specification allows only strings as object property names, but Genson allows to map this keys to some - limited - other types.

Customizing Genson

If the default configuration of Genson does not fit your needs you can customize it via the GensonBuilder. For example to enable indentation of the output, serialize all objects using their runtime type and deserialize to classes that don't provide a default no argument constructor can be achieved with following configuration.

Genson genson = new GensonBuilder()
  .useIndentation(true)
  .useRuntimeType(true)
  .useConstructorWithArguments(true)
  .create();

You are ready to rock the JSON! :)

Copyright and license

Copyright 2011-2014 Genson - Cepoi Eugen

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Comments
  • Provide a bundle for JSR 310 Date & Time API

    Provide a bundle for JSR 310 Date & Time API

    This jsr is not provided as a maven dep. The best solution would be to provide this new bundle as a separate project in order to support older java versions.

    enhancement 
    opened by EugenCepoi 15
  • Extend JAX-RS en/disabling support to RestEasy

    Extend JAX-RS en/disabling support to RestEasy

    Hi,

    I'm aware of a similar issue (#39) that implements disabling JAX-RS for Jersey implementation.

    I think that the appeal for genson addition to an existing app is the smoother control on serialization, specially in case of migration from JAXB format to a cleaner alternative. We are facing this problem with jettison JAXB implementation that seems to be quite restrictive.

    Said that, I figured out that this feature (#39) is constrained to Jersey application. Would it be possible to do such JAX-RS switching mechanism to ReastEasy implementation?

    I tried to hack from the source but just achieved success by removing the META-INF/service folder declared hooks from the final JAR.

    Do you know an alternative to switch genson on/of in Resteasy? If you have an idea, an you agree, I could implement it and submit a patch.

    Thank you!

    opened by ragnarokkrr 14
  • Extension for JSR 310 Date & Time API. Fixes #33

    Extension for JSR 310 Date & Time API. Fixes #33

    Build note: I was able to get the whole project to compile while calling maven using JDK 1.7 by configuring a toolchain in the genson-java-datetime pom. This will require a 1.8 JDK to be configured in ~/.m2/toolchains.xml

    Calling maven with a 1.8 JDK will build this module but genson-scala fails due to Java 1.8 adding additional properties to TypeVariable which are not configured in the scala classes that extend this type. I'm not knowledgeable in scala so I'm not sure what the best solution would be

    opened by nicky9door 12
  • Genson JaxbBundle not utilizing XmlJavaTypeAdapter properly

    Genson JaxbBundle not utilizing XmlJavaTypeAdapter properly

    Genson chokes when trying to write out my java.util.Calendar dates because the JaxbBeanPropertyFactory.getType() method doesn't check to see if the AccessibleObject has an XmlJavaTypeAdapter in order to ensure that the XmlElement type will be assignable. The method works if we simply check that the annotation is non-null:

    private Type getType(AccessibleObject object, Type objectType, Type contextType) {
      XmlElement el = object.getAnnotation(XmlElement.class);
      if (el != null && el.type() != XmlElement.DEFAULT.class) {
        if (!TypeUtil.getRawClass(objectType).isAssignableFrom(el.type())) {
            XmlJavaTypeAdapter ad = object.getAnnotation(XmlJavaTypeAdapter.class);
            if (ad == null) 
              throw new ClassCastException("Inavlid XmlElement annotation, " + objectType
                + " is not assignable from " + el.type());
        }
        return el.type();
      } else
        return null;
    }
    

    Once that works, then we find that the XmlTypeAdapterFactory.create() method uses the wrong parameter in the match() call...rather than compare the propertyType to the originalType, it should compare it to the adaptedType instead:

    if (!match(propertyType, adaptedType, false))
    

    Of course, the JaxbAnnotationsSupportTest breaks, but I suspect this might be due to the XmlJavaTypeAdapterBean's public int v only having an XmlJavaTypeAdapter annotation and no XmlElement annotation (both would be generated by JAX-B).

    opened by jessecrossley 12
  • Genson json converter is active depending on some JAXB annotations

    Genson json converter is active depending on some JAXB annotations

    I am using JavaEE 7 with Payara 4.1.1.161 as an application server and Genson 1.3 as a maven dependency.

    As far as I understood the documentation, Genson should be active for JAX-RS, once it is in the classpath. I found a strange behavior that depending on some JAXB annotations sometimes Genson json converter is active and sometimes not.

    I created a minimalistic example here: TestWebApp.zip

    I use a simple class Car

    @XmlRootElement
    public class Car
    {
        // ...
        private String brand;
        private List<Wheel> wheels;
        private Map<String, String> features;
    
        //@XmlElementWrapper
        //@XmlJavaTypeAdapter(WheelAdapter.class)
        public List<Wheel> getWheels()
        {
            return wheels;
        }
    
        public void setWheels(List<Wheel> wheels)
        {
            this.wheels = wheels;
        }
    
        // ...
    }
    

    and a JAX-RS method:

        @GET
        @Produces(MediaType.APPLICATION_JSON)
        public Response getCar()
        {
            return Response.ok()
                .entity(
                    new Car("BMW", Arrays.asList(new Wheel(17), new Wheel(17), new Wheel(17), new Wheel(17)))
                )
                .build();
        }
    

    When the annotations are commented out it looks like JAXB is used:

    {
      "brand": "BMW",
      "features": {
        "entry": [
          {
            "key": "engine",
            "value": "2.0"
          }
        ]
      },
      "wheels": [
        {
          "size": 17
        },
        {
          "size": 17
        },
        {
          "size": 17
        },
        {
          "size": 17
        }
      ]
    }
    

    Also when I include only one of the annotations, JAXB is still used. But if I include both of them, it looks like Genson gets active

    {
      "brand": "BMW",
      "features": {
        "engine": "2.0"
      },
      "wheels": [
        "17 inch",
        "17 inch",
        "17 inch",
        "17 inch"
      ]
    }
    

    This behavior is strange for me and not predictable. In my opinion Genson should be either active in all cases or not at all. I am not sure if I missed some documentation / configuration, or if it is a bug.

    opened by simdevmon 9
  • Unable to deserialize string or literal into Object type field.

    Unable to deserialize string or literal into Object type field.

    Consider the following:

    public static class BaseSimple<T> {
        public T value;
    
        public BaseSimple() {
        }
    
        public BaseSimple(final T value) {
          this.value = value;
        }
    
        @Override
        public boolean equals(final Object o) {
          if (this == o) return true;
          if (o == null || getClass() != o.getClass()) return false;
          final BaseSimple<?> that = (BaseSimple<?>) o;
          return Objects.equals(value, that.value);
        }
    
        @Override
        public int hashCode() {
          return Objects.hash(value);
        }
      }
    
      public static class Simple<T> extends BaseSimple<T> {
        @SuppressWarnings("unused")
        public Simple() {}
        public Simple(final T value) {
          super(value);
        }
      }
    

    Along with the following test:

    @Test
      public void testDeserializeStringIntoObjectField() {
         BaseSimple result = genson.deserialize("{\"value\":\"test\"}", BaseSimple.class);
         assertEquals(new BaseSimple("test"), result);
      }
    
    @Test
      public void testDeserializeStringIntoObjectFieldHierachy() {
          Simple result = genson.deserialize("{\"value\":\"test\"}", Simple.class);
          assertEquals(new Simple("test"), result);
      }
    

    The first test case, testDeserializeStringIntoObjectField works fine. The second test, testDeserializeStringIntoObjectFieldHierachy, fails with:

    Caused by: com.owlike.genson.stream.JsonStreamException: Illegal character at row 0 and column 15 expected { but read '}' ! at com.owlike.genson.stream.JsonReader.newWrongTokenException(JsonReader.java:948) at com.owlike.genson.stream.JsonReader.begin(JsonReader.java:420) at com.owlike.genson.stream.JsonReader.beginObject(JsonReader.java:158) at com.owlike.genson.reflect.BeanDescriptor.deserialize(BeanDescriptor.java:117) at com.owlike.genson.reflect.BeanDescriptor.deserialize(BeanDescriptor.java:103) at com.owlike.genson.convert.RuntimeTypeConverter.deserialize(RuntimeTypeConverter.java:53) at com.owlike.genson.convert.NullConverterFactory$NullConverterWrapper.deserialize(NullConverterFactory.java:77) at com.owlike.genson.reflect.PropertyMutator.deserialize(PropertyMutator.java:31)

    If I wrap the type in the deserialization call in the failing test with GenericType then the test will pass. Seems in the case where the target field is Object, we shouldn't need the extra info provided by GenericType, the value should just be set of it's a JSON string/number/bool.

    opened by rlubke 7
  • `Option` type parses to `null` instead of `None`

    `Option` type parses to `null` instead of `None`

    Would be the best json lib by far otherwise ... shame

    scala> import com.owlike.genson.defaultGenson._
    import com.owlike.genson.defaultGenson._
    
    scala> case class A(optional: Option[Int])
    defined class A
    
    scala> fromJson[A]("{}")
    res0: A = A(null)
    
    opened by samthebest 7
  • Generated from XSD, how to set @JsonProperty

    Generated from XSD, how to set @JsonProperty

    I have a XSD, like: <xs:complexType name="property"> <xs:attribute name="key" type="xs:string" use="required"/> <xs:attribute name="value" type="xs:string" use="required"/> </xs:complexType> And the binding.xjb like: <jxb:bindings node="xs:complexType[@name='property']"> <annox:annotate> <annox:annotate annox:class="javax.xml.bind.annotation.XmlRootElement" name="property"/> </annox:annotate> </jxb:bindings> <jxb:bindings node="xs:complexType[@name='property']/xs:attribute[@name='key']"> <annox:annotate target="field">@com.owlike.genson.annotation.JsonProperty(value="@key")</annox:annotate> </jxb:bindings> <jxb:bindings node="xs:complexType[@name='property']/xs:attribute[@name='value']"> <annox:annotate target="field">@com.owlike.genson.annotation.JsonProperty(value="@value")</annox:annotate> </jxb:bindings>

    But when test with the generated Property.java, it print as: { "@key":"tKey", "@value":"tValue", "key":"tKey", "value":"tValue" }

    I just want "@key" and "@value", not "key" nor "value". How to solve this issue?

    opened by ghost 7
  • Genson annotations not overriding Jaxb annotations

    Genson annotations not overriding Jaxb annotations

    I have a Jersey no-xml webapp that includes the GensonJsonConverter automatically. My generated, annotated JAXB pojos receive @JsonIgnore annotations on certain fields (I did not add the annotations to the accessors or mutators), but the ignore is ignored. For example, I have a createdBy field annotated thusly: @XmlElement(name = "CreatedBy", required = true) @JsonIgnore protected String createdBy;

    Does this ring any bells? I've attempted to make my own Genson ContextResolver and control the GensonBuilder, but it did not suffice (it's more than possible that I didn't correctly configure the builder). Looking through the JAXBBundle code, it isn't readily apparent to me how it falls back to the @JsonIgnore annotations.

    opened by jessecrossley 7
  • Java 17 Compatibility

    Java 17 Compatibility

    These are the minimum changes needed for Java 17 to address the reflection issues specified in #173

    I think only the first commit is actually needed to handle the reflection issues. The other commits were necessary to build using jdk 17. They could be removed but I left them in case it makes sense to create a separate java 17 specific artifact

    A couple notes:

    • Non-public members are ignored for classes under 'java.' and 'javax.' packages
    • Since Java 11(?), getResourceAsStream only looks within the module of the class which caused a couple tests to fail. Using getSystemResourceAsStream seems to work
    • ASM needed to be updated to Opcode version 7 (minimum needed for Java 11). Note that Opcode 8 and 9 is available
    • Scala needed to be updated in order to compile. I updated to version 2.12. Version 2.13 is more current but it removed CanBuildFrom and I have too little knowledge of Scala to know the proper way of updating the code
    opened by nicky9door 6
  • Decrease Jersey autodiscoverable level

    Decrease Jersey autodiscoverable level

    Current Jersey autodiscoverable priority is high than default. This can cause Genson becomes default serializer for Jersey in projects that are using other serializers when you add Genson or some custom library that has Genson as dependency. This PR tries to solve this issue.

    opened by jordillonch 6
  • Bump spring-beans from 5.2.2.RELEASE to 5.2.20.RELEASE in /genson

    Bump spring-beans from 5.2.2.RELEASE to 5.2.20.RELEASE in /genson

    Bumps spring-beans from 5.2.2.RELEASE to 5.2.20.RELEASE.

    Release notes

    Sourced from spring-beans's releases.

    v5.2.20.RELEASE

    :star: New Features

    • Restrict access to property paths on Class references #28262
    • Improve diagnostics in SpEL for large array creation #28257

    v5.2.19.RELEASE

    :star: New Features

    • Declare serialVersionUID on DefaultAopProxyFactory #27785
    • Use ByteArrayDecoder in DefaultClientResponse::createException #27667

    :lady_beetle: Bug Fixes

    • ProxyFactoryBean getObject called before setInterceptorNames, silently creating an invalid proxy [SPR-7582] #27817
    • Possible NPE in Spring MVC LogFormatUtils #27783
    • UndertowHeadersAdapter's remove() method violates Map contract #27593
    • Fix assertion failure messages in DefaultDataBuffer.checkIndex() #27577

    :notebook_with_decorative_cover: Documentation

    • Lazy annotation throws exception if non-required bean does not exist #27660
    • Incorrect Javadoc in [NamedParameter]JdbcOperations.queryForObject methods regarding exceptions #27581
    • DefaultResponseErrorHandler update javadoc comment #27571

    :hammer: Dependency Upgrades

    • Upgrade to Reactor Dysprosium-SR25 #27635
    • Upgrade to Log4j2 2.16.0 #27825

    v5.2.18.RELEASE

    :star: New Features

    • Enhance DefaultResponseErrorHandler to allow logging complete error response body #27558
    • DefaultMessageListenerContainer does not log an error/warning when consumer tasks have been rejected #27457

    :lady_beetle: Bug Fixes

    • Performance impact of con.getContentLengthLong() in AbstractFileResolvingResource.isReadable() downloading huge jars to check component length #27549
    • Performance impact of ResourceUrlEncodingFilter on HttpServletResponse#encodeURL #27548
    • Avoid duplicate JCacheOperationSource bean registration in #27547
    • Non-escaped closing curly brace in RegEx results in initialization error on Android #27502
    • Proxy generation with Java 17 fails with "Cannot invoke "Object.getClass()" because "cause" is null" #27498
    • ConcurrentReferenceHashMap's entrySet violates the Map contract #27455

    :hammer: Dependency Upgrades

    • Upgrade to Reactor Dysprosium-SR24 #27526

    v5.2.17.RELEASE

    ... (truncated)

    Commits
    • cfa701b Release v5.2.20.RELEASE
    • 996f701 Refine PropertyDescriptor filtering
    • 90cfde9 Improve diagnostics in SpEL for large array creation
    • 94f52bc Upgrade to Artifactory Resource 0.0.17
    • d4478ba Upgrade Java versions in CI image
    • 136e6db Upgrade Ubuntu version in CI images
    • 8f1f683 Upgrade Java versions in CI image
    • ce2367a Upgrade to Log4j2 2.17.1
    • acf7823 Next development version (v5.2.20.BUILD-SNAPSHOT)
    • 1a03ffe Upgrade to Log4j2 2.16.0
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump spring-webmvc from 5.2.2.RELEASE to 5.2.20.RELEASE in /genson

    Bump spring-webmvc from 5.2.2.RELEASE to 5.2.20.RELEASE in /genson

    Bumps spring-webmvc from 5.2.2.RELEASE to 5.2.20.RELEASE.

    Release notes

    Sourced from spring-webmvc's releases.

    v5.2.20.RELEASE

    :star: New Features

    • Restrict access to property paths on Class references #28262
    • Improve diagnostics in SpEL for large array creation #28257

    v5.2.19.RELEASE

    :star: New Features

    • Declare serialVersionUID on DefaultAopProxyFactory #27785
    • Use ByteArrayDecoder in DefaultClientResponse::createException #27667

    :lady_beetle: Bug Fixes

    • ProxyFactoryBean getObject called before setInterceptorNames, silently creating an invalid proxy [SPR-7582] #27817
    • Possible NPE in Spring MVC LogFormatUtils #27783
    • UndertowHeadersAdapter's remove() method violates Map contract #27593
    • Fix assertion failure messages in DefaultDataBuffer.checkIndex() #27577

    :notebook_with_decorative_cover: Documentation

    • Lazy annotation throws exception if non-required bean does not exist #27660
    • Incorrect Javadoc in [NamedParameter]JdbcOperations.queryForObject methods regarding exceptions #27581
    • DefaultResponseErrorHandler update javadoc comment #27571

    :hammer: Dependency Upgrades

    • Upgrade to Reactor Dysprosium-SR25 #27635
    • Upgrade to Log4j2 2.16.0 #27825

    v5.2.18.RELEASE

    :star: New Features

    • Enhance DefaultResponseErrorHandler to allow logging complete error response body #27558
    • DefaultMessageListenerContainer does not log an error/warning when consumer tasks have been rejected #27457

    :lady_beetle: Bug Fixes

    • Performance impact of con.getContentLengthLong() in AbstractFileResolvingResource.isReadable() downloading huge jars to check component length #27549
    • Performance impact of ResourceUrlEncodingFilter on HttpServletResponse#encodeURL #27548
    • Avoid duplicate JCacheOperationSource bean registration in #27547
    • Non-escaped closing curly brace in RegEx results in initialization error on Android #27502
    • Proxy generation with Java 17 fails with "Cannot invoke "Object.getClass()" because "cause" is null" #27498
    • ConcurrentReferenceHashMap's entrySet violates the Map contract #27455

    :hammer: Dependency Upgrades

    • Upgrade to Reactor Dysprosium-SR24 #27526

    v5.2.17.RELEASE

    ... (truncated)

    Commits
    • cfa701b Release v5.2.20.RELEASE
    • 996f701 Refine PropertyDescriptor filtering
    • 90cfde9 Improve diagnostics in SpEL for large array creation
    • 94f52bc Upgrade to Artifactory Resource 0.0.17
    • d4478ba Upgrade Java versions in CI image
    • 136e6db Upgrade Ubuntu version in CI images
    • 8f1f683 Upgrade Java versions in CI image
    • ce2367a Upgrade to Log4j2 2.17.1
    • acf7823 Next development version (v5.2.20.BUILD-SNAPSHOT)
    • 1a03ffe Upgrade to Log4j2 2.16.0
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump spring-web from 5.2.2.RELEASE to 6.0.0 in /genson

    Bump spring-web from 5.2.2.RELEASE to 6.0.0 in /genson

    Bumps spring-web from 5.2.2.RELEASE to 6.0.0.

    Release notes

    Sourced from spring-web's releases.

    v6.0.0

    See What's New in Spring Framework 6.x and Upgrading to Spring Framework 6.x for upgrade instructions and details of new features.

    :star: New Features

    • Avoid direct URL construction and URL equality checks #29486
    • Simplify creating RFC 7807 responses from functional endpoints #29462
    • Allow test classes to provide runtime hints via declarative mechanisms #29455

    :notebook_with_decorative_cover: Documentation

    • Align javadoc of DefaultParameterNameDiscoverer with its behavior #29494
    • Document AOT support in the TestContext framework #29482
    • Document Ahead of Time processing in the reference guide #29350

    :hammer: Dependency Upgrades

    • Upgrade to Reactor 2022.0.0 #29465

    :heart: Contributors

    Thank you to all the contributors who worked on this release:

    @​ophiuhus and @​wilkinsona

    v6.0.0-RC4

    :star: New Features

    • Introduce DataFieldMaxValueIncrementer for SQL Server sequences #29447
    • Introduce findAllAnnotationsOnBean variant on ListableBeanFactory #29446
    • Introduce support for Jakarta WebSocket 2.1 #29436
    • Allow @ControllerAdvice in WebFlux to handle exceptions before a handler is selected #22991

    :lady_beetle: Bug Fixes

    • Bean with unresolved generics do not use fallback algorithms with AOT #29454
    • TomcatRequestUpgradeStrategy is not compatible with Tomcat 10.1 #29434
    • Autowiring of a generic type produced by a factory bean fails after AOT processing #29385

    :notebook_with_decorative_cover: Documentation

    • Reference PDF containing full docs not available #28451

    :hammer: Dependency Upgrades

    • Revisit Servlet API baseline: Servlet 6.0 in the build, Servlet 5.0 compatibility at runtime #29435
    • Upgrade to Context Propagation 1.0.0 #29442
    • Upgrade to Jackson 2.14.0 #29351
    • Upgrade to Micrometer 1.10.0 #29441

    ... (truncated)

    Commits
    • 5a30a43 Release v6.0.0
    • 42856ba Add milestone repo for optional Netty 5 support
    • 9be6cea Polishing deprecated methods
    • 37b4391 Align javadoc of DefaultParameterNameDiscoverer with its behavior
    • 09a58a5 Polish
    • 10f4ad1 Assert fixed in DefaultErrorResponseBuilder
    • 9457ed3 Document AOT support in the TestContext framework
    • 074ec97 Fix section formatting in the testing chapter
    • 9ede4af Revert "Ignore HttpComponents Javadoc"
    • bfc1251 Merge branch '5.3.x'
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump jackson-databind from 2.9.10.1 to 2.12.6.1 in /genson

    Bump jackson-databind from 2.9.10.1 to 2.12.6.1 in /genson

    Bumps jackson-databind from 2.9.10.1 to 2.12.6.1.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump jetty-server from 9.4.17.v20190418 to 10.0.10 in /genson

    Bump jetty-server from 9.4.17.v20190418 to 10.0.10 in /genson

    Bumps jetty-server from 9.4.17.v20190418 to 10.0.10.

    Release notes

    Sourced from jetty-server's releases.

    10.0.10

    Special Thanks to the following Eclipse Jetty community members

    Changelog

    • #8136 - Cherry-pick of Improvements to PathSpec for Jetty 10.0.x
    • #8134 - Improve cleanup of deflater/inflater pools for PerMessageDeflateExtension
    • #8088 - Add option to configure exitVm on ShutdownMonitor from System properties
    • #8067 - Wall time usage in DoSFilter RateTracker results in false positive alert
    • #8057 - Support Http Response 103 (Early Hints)
    • #8014 - Review HttpRequest URI construction
    • #8008 - Add compliance mode for LEGACY multipart parser in Jetty 10+
    • #7994 - Ability to construct a detached client Request
    • #7981 - Add TRANSFER_ENCODING violation for MultiPart RFC7578 parser. (#7976)
    • #7977 - UpgradeHttpServletRequest.setAttribute & UpgradeHttpServletRequest.removeAttribute can throw NullPointerException
    • #7975 - ForwardedRequestCustomizer setters do not clear existing handlers
    • #7953 - Fix StatisticsHandler in the case a Handler throws exception.
    • #7935 - Review HTTP/2 error handling
    • #7929 - Correct requestlog formatString commented default (@​prenagha)
    • #7924 - Fix a typo in Javadoc (@​jianglai)
    • #7918 - PathMappings.asPathSpec does not allow root ServletPathSpec
    • #7891 - Better Servlet PathMappings for Regex
    • #7880 - DefaultServlet should not overwrite programmatically configured precompressed formats with defaults (@​markslater)
    • #7863 - Default servlet drops first accept-encoding header if there is more than one. (@​markslater)
    • #7858 - GZipHandler does not play nice with other handlers in HandlerCollection
    • #7818 - Modifying of HTTP headers in HttpChannel.Listener#onResponseBegin is no longer possible with Jetty 10
    • #7808 - Jetty 10.0.x 7801 duplicate set session cookie
    • #7802 - HTTP/3 QPACK - do not expect section ack for zero required insert count
    • #7754 - jetty.sh ignores JAVA_OPTIONS environment variable
    • #7748 - Allow overriding of url-pattern mapping in ServletContextHandler to allow for regex or uri-template matching
    • #7635 - QPACK decoder should fail connection if the encoder blocks more than SETTINGS_QPACK_BLOCKED_STREAMS
    • #4414 - GZipHandler not excluding inflation for specified paths
    • #1771 - Add module for SecuredRedirect support

    Dependencies

    • #8083 - Bump asciidoctorj to 2.5.4
    • #8077 - Bump asciidoctorj-diagram to 2.2.3
    • #7839 - Bump asm.version to 9.3
    • #8142 - Bump biz.aQute.bndlib to 6.3.1
    • #8075 - Bump checkstyle to 10.3
    • #8056 - Bump error_prone_annotations to 2.14.0
    • #8109 - Bump google-cloud-datastore to 2.7.0
    • #8100 - Bump grpc-core to 1.47.0
    • #7987 - Bump hawtio-default to 2.15.0

    ... (truncated)

    Commits
    • de73e94 Updating to version 10.0.10
    • 1b4f941 RegexPathSpec documentation and MatchedPath improvements (#8163)
    • 1f902f6 Disable H3 tests by default with a system property to explicitly enable them ...
    • 7cc461b Fixing javadoc build errors (#8173)
    • d63569d Migrate code from jetty-util Logger to slf4j Logger (#8162)
    • 66de7ba Improve ssl buffers handling (#8165)
    • 0699bc5 Use static exceptions for closing websocket flushers and in ContentProducer (...
    • b1c19c0 Merge pull request #8134 from eclipse/jetty-10.0.x-websocketPermessageDeflate...
    • 23948f1 no more profile IT tests runs per default (#8138)
    • 0d13cbe change-dependabot-interval-to-monthly (#8140)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump resteasy-jaxrs from 3.0.10.Final to 3.0.11.Final in /genson

    Bump resteasy-jaxrs from 3.0.10.Final to 3.0.11.Final in /genson

    Bumps resteasy-jaxrs from 3.0.10.Final to 3.0.11.Final.

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
Convert Java to JSON. Convert JSON to Java. Pretty print JSON. Java JSON serializer.

json-io Perfect Java serialization to and from JSON format (available on Maven Central). To include in your project: <dependency> <groupId>com.cedar

John DeRegnaucourt 303 Dec 30, 2022
JSON to JSON transformation library written in Java.

Jolt JSON to JSON transformation library written in Java where the "specification" for the transform is itself a JSON document. Useful For Transformin

Bazaarvoice 1.3k Dec 30, 2022
Screaming fast JSON parsing and serialization library for Android.

#LoganSquare The fastest JSON parsing and serializing library available for Android. Based on Jackson's streaming API, LoganSquare is able to consiste

BlueLine Labs 3.2k Dec 18, 2022
A simple java JSON deserializer that can convert a JSON into a java object in an easy way

JSavON A simple java JSON deserializer that can convert a JSON into a java object in an easy way. This library also provide a strong object convertion

null 0 Mar 18, 2022
Generate Java types from JSON or JSON Schema and annotates those types for data-binding with Jackson, Gson, etc

jsonschema2pojo jsonschema2pojo generates Java types from JSON Schema (or example JSON) and can annotate those types for data-binding with Jackson 2.x

Joe Littlejohn 5.9k Jan 5, 2023
Essential-json - JSON without fuss

Essential JSON Essential JSON Rationale Description Usage Inclusion in your project Parsing JSON Rendering JSON Building JSON Converting to JSON Refer

Claude Brisson 1 Nov 9, 2021
A 250 lines single-source-file hackable JSON deserializer for the JVM. Reinventing the JSON wheel.

JSON Wheel Have you ever written scripts in Java 11+ and needed to operate on some JSON string? Have you ever needed to extract just that one deeply-n

Roman Böhm 14 Jan 4, 2023
A fast JSON parser/generator for Java.

fastjson Fastjson is a Java library that can be used to convert Java Objects into their JSON representation. It can also be used to convert a JSON str

Alibaba 25.1k Dec 31, 2022
Fast JSON parser for java projects

ig-json-parser Fast JSON parser for java projects. Getting started The easiest way to get started is to look at maven-example. For more comprehensive

Instagram 1.3k Dec 26, 2022
A Java serialization/deserialization library to convert Java Objects into JSON and back

Gson Gson is a Java library that can be used to convert Java Objects into their JSON representation. It can also be used to convert a JSON string to a

Google 21.7k Jan 8, 2023
A universal types-preserving Java serialization library that can convert arbitrary Java Objects into JSON and back

A universal types-preserving Java serialization library that can convert arbitrary Java Objects into JSON and back, with a transparent support of any kind of self-references and with a full Java 9 compatibility.

Andrey Mogilev 9 Dec 30, 2021
A modern JSON library for Kotlin and Java.

Moshi Moshi is a modern JSON library for Android and Java. It makes it easy to parse JSON into Java objects: String json = ...; Moshi moshi = new Mos

Square 8.7k Dec 31, 2022
Sawmill is a JSON transformation Java library

Update: June 25, 2020 The 2.0 release of Sawmill introduces a breaking change to the GeoIpProcessor to comply with the updated license of the MaxMind

Logz.io 100 Jan 1, 2023
Lean JSON Library for Java, with a compact, elegant API.

mJson is an extremely lightweight Java JSON library with a very concise API. The source code is a single Java file. The license is Apache 2.0. Because

Borislav Iordanov 77 Dec 25, 2022
Elide is a Java library that lets you stand up a GraphQL/JSON-API web service with minimal effort.

Elide Opinionated APIs for web & mobile applications. Read this in other languages: 中文. Table of Contents Background Documentation Install Usage Secur

Yahoo 921 Jan 3, 2023
JSON Library for Java with a focus on providing a clean DSL

JSON Library for Java with a focus on providing a clean DSL

Vaishnav Anil 0 Jul 11, 2022
High performance JVM JSON library

DSL-JSON library Fastest JVM (Java/Android/Scala/Kotlin) JSON library with advanced compile-time databinding support. Compatible with DSL Platform. Ja

New Generation Software Ltd 835 Jan 2, 2023
A JSON Transmission Protocol and an ORM Library for automatically providing APIs and Docs.

?? 零代码、热更新、全自动 ORM 库,后端接口和文档零代码,前端(客户端) 定制返回 JSON 的数据和结构。 ?? A JSON Transmission Protocol and an ORM Library for automatically providing APIs and Docs.

Tencent 14.4k Dec 31, 2022
A reference implementation of a JSON package in Java.

JSON in Java [package org.json] Click here if you just want the latest release jar file. Overview JSON is a light-weight language-independent data int

Sean Leary 4.2k Jan 6, 2023