When writing new code, I am unsure whether it's better to use org.json or javax.json.
- Is one recommended over the other?
- Is there an easy way to convert between one library to the other (apart from serializing and deserializing)?
Pros and cons
javax.json
- Implements JSR 353
- supports the builder pattern for constructing objects & arrays and making immutable (desirable for functional programming style)
- implements
java.util.Collection
interfaces
org.json
- Has an (easier) way to pretty-print objects
- is present in a lot of code bases already
Aucun commentaire:
Enregistrer un commentaire