commit | b16c587dcb5e07628d43f61c9a75fa61daf92dc6 | [log] [tgz] |
---|---|---|
author | Roman Grigoriadi <bravehorsie@gmail.com> | Tue Oct 02 08:32:12 2018 +0200 |
committer | GitHub <noreply@github.com> | Tue Oct 02 08:32:12 2018 +0200 |
tree | 95d0823ff70bf64e3e708b0bc8dda62323513282 | |
parent | 80b9c107a940838fcc14e80244c81437238ff3aa [diff] | |
parent | 39ddaa518cc7218d3289401c9c0e6d796f2d2165 [diff] |
Merge pull request #160 from eclipse-ee4j/interface-methods-in-class-processing Interface methods left out
Yasson is a Java framework which provides a standard binding layer between Java classes and JSON documents. This is similar to what JAXB is doing in the XML world. Yasson is an official reference implementation of JSON Binding (JSR-367).
It defines a default mapping algorithm for converting existing Java classes to JSON suitable for the most cases:
Jsonb jsonb = JsonbBuilder.create(); String result = jsonb.toJson(someObject);
For whom it's not enough it provides rich customization abilities through a set of annotations and rich programmatic API:
// Create custom configuration JsonbConfig config = new JsonbConfig() .withNullValues(true) .withFormating(true); // Create Jsonb with custom configuration Jsonb jsonb = JsonbBuilder.create(config); // Use it! String result = jsonb.toJson(someObject);