-
Notifications
You must be signed in to change notification settings - Fork 63
Open
Description
JsonObjectBuilder is a very convenient API and has the advantage in current form to not loose immediately the format of the underlying data (BigDecimal/BigInteger, long, ....). However I think it should cover what developpers consider as "primitives". To be accurate I think we can use json schema specification as a basis.
What is missing IMO is:
- date-time (can use java 8 types and formatters as "normalizer" when it goes to JsonObject)
- date (can use java 8 types and formatters as "normalizer" when it goes to JsonObject)
- time (can use java 8 types and formatters as "normalizer" when it goes to JsonObject)
- email, hostname (think these ones can be collapsed with string since no other format uses this information I think)
- ipaddress (java.net)
- resource identifier (URI)
- regex (this one is to refine since I'm not sure a Pattern can easily and accurately be converted to a string all the times)
- ...
The most important (and urgent) item is likely about the dates but longer term it would be very good to have an API allowing users or implementations to generate a schema from the builder API transparently (just decorating the default implementations).