Clone this repo:
  1. ba42fac Merge pull request #709 from KyleAure/673-additional-testing by James R. Perkins · 4 weeks ago main
  2. 8233373 Merge pull request #690 from jamezp/serialization-fix by James R. Perkins · 4 weeks ago
  3. 43e7a63 doc: document new tests and maintain Java 11 compatibility (for now) by Kyle Aure · 4 weeks ago
  4. 1694726 Merge pull request #694 from redmitry/master by Kyle Aure · 4 weeks ago
  5. ca6cd32 Merge pull request #705 from KyleAure/rename-branch by James R. Perkins · 3 months ago

Eclipse Yasson

Maven Central

Gitter Javadocs Build Status License

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)
  .withFormatting(true);

// Create Jsonb with custom configuration
Jsonb jsonb = JsonbBuilder.create(config);

// Use it!
String result = jsonb.toJson(someObject);

Questions?

Something not working right? Have an idea for an enhancement? Get in touch with the Yasson community in the following ways:

  • Gitter: a free instant-messaging platform (similar to Slack) that anyone can join.
  • Stackoverflow: As a question tagged [jsonb-api] and [yasson]
  • Github Issues: Open issues for enhancement ideas or bug reports

Licenses

Links