316 improve exception message (#318)

* improvement 316 add .idea directory to .gitignore

.idea directory should not be checked and is auto generated by the IDE.
So the directory should be ignored by git.

Signed-off-by: Simulant <nfaupel.dev@gmail.com>

* improvement 316 improve Exception message for missing constructor

when the default constructor is missing, the class name is contained in
the error message so the issue is easier to fix by the user.
Added a unit test to ensure the class name is contained in the message.

Signed-off-by: Simulant <nfaupel.dev@gmail.com>

* improvement 316 add missing java doc for parameter

Signed-off-by: Simulant <nfaupel.dev@gmail.com>

* bugfix 316 assert JsonbException instead of RuntimeException

Signed-off-by: Simulant <nfaupel.dev@gmail.com>
4 files changed
tree: dcf061b7050f58157adc14a8a63f5f24d031576d
  1. src/
  2. yasson-jmh/
  3. .gitignore
  4. .travis.yml
  5. CONTRIBUTING.md
  6. LICENSE.md
  7. NOTICE.md
  8. pom.xml
  9. README.md
README.md

Eclipse Yasson

Maven Central Sonatype Nexus (Snapshots) 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)
  .withFormating(true);

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

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

Licenses

Links