jakartaee / jakartaee/jsonp-api

Embrace more types on ObjectBuilder? Enable JSON-Schema linkage

Open
#103 8 comments 0 reactions 0 assignees View on GitHub
spec
Dominant language
Java
Stars
160
Forks
64
Avg merge
4d 5h
Merged PRs (30d)
4

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).

Contributor guide

Open the contributing guide

Research direction

Begin by reviewing the JsonObjectBuilder API and the JSON Schema formats described in the issue, prioritizing date-time, date, and time with Java 8 types and formatters. Done requires a narrowed, agreed scope for supported types and conversion or schema behavior, with corresponding tests identified before implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.