jsonb-api
jsonb-api copied to clipboard
Jakarta JSON Binding
From the JSON-B specification: > The serialization format of `java.util.TimeZone` and `SimpleTimeZone` is `NormalizedCustomID` as specified in `java.util.TimeZone`. The `NormalizedCustomID` format is defined in the JavaDoc for [TimeZone](https://docs.oracle.com/javase/8/docs/api/java/util/TimeZone.html#NormalizedCustomID). A valid...
Optional types has not compatible serialization and deserialization. Deserialization: - missing field - java field is null / unchanged, - "null" - Optional.empty(), - "any value" - deserialized to java...
`BasicJavaTypesMappingTest#testFloatMapping` tests the serialization of `Float.MAX_VALUE`. The testing harness contains the following lines. The comments with "mtd" are mine and explain the problem: ```java // value Float.MAX_VALUE can have E38...
Hi! We got an interesting case from a user over in Apache Johnzon. https://issues.apache.org/jira/browse/JOHNZON-177 They basically have a POJO which has an int field. But the sent JSON is actually...
The JSON-B specification mentions "Instances of [...] java.lang.Character are serialized to JSON String values as defined within RFC 7159 Section 7 (Strings)". The RFC (https://tools.ietf.org/html/rfc7159#section-7) mentions that "All Unicode characters...
According to the JSON-B specification a `java.time.`ZoneId instance needs to be serialized as follows (emphasis mine): > Implementations MUST support the deserialization of any time zone ID format specified in...
Some data binding frameworks provide a way to do mappings to/from parsers and generator. JAXB: https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXB.html#unmarshal-javax.xml.transform.Source-java.lang.Class- https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXB.html#marshal-java.lang.Object-javax.xml.transform.Result- (see StAXResult and StAXSource) Jackson: https://fasterxml.github.io/jackson-databind/javadoc/2.7/com/fasterxml/jackson/databind/ObjectMapper.html#writeValue(com.fasterxml.jackson.core.JsonGenerator,%20java.lang.Object) https://fasterxml.github.io/jackson-databind/javadoc/2.7/com/fasterxml/jackson/databind/ObjectMapper.html#readValues(com.fasterxml.jackson.core.JsonParser,%20java.lang.Class) This is a useful feature as...
TCK as of Jakarta EE 8 does not detect the following violation of the JSON-B specification 1.1: - Johnzon does not implement JsonbConfig#with(De)Serializers, but instead throws an exception, while the...
Docs show using `jsonb.fromJson()` and `jsonb.toJson()` following `Jsonb jsonb = JsonbBuilder.create()`, but the docs are highly misleading in not showing the required `jsonb.close()` calls. Update the docs to show the...