jakartaee / jakartaee/jsonb-api

ES6 Compatible Parsing & Serialization

Open
#50 11 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
95
Forks
41
Avg merge
1d 6h
Merged PRs (30d)
35

Description

ES6 (EcmaScript version 6) and forward specifies very specific rules for serialization including "predictive property" order. This may appear strange but for a human creating the properties A, B, C and getting them serialized as A, C, B is slightly awkward, although completely compatible with JSON.

In addition, ES6 also specifies strict rules for serializing numbers which are quite different from what native Java does.

Anyway, a huge advantage with ES6 parsing and serialization is that it makes it possible creating very elegant "crypto safe" objects as described here: https://cyberphone.github.io/doc/security/jsonsignatures.html

This is currently supported by an open source library of mine (https://github.com/cyberphone/openkeystore#openkeystore) but it would be even cooler if ES6 compatible parsing and serialization would be a part of JSON-B or at least of your reference implementation. This should be coordinated with your JavaScript engine since the very same scheme must be running there already.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the JSON-B API and its reference implementation, then examine how the coordinated JavaScript engine handles ES6 parsing and serialization. Compare the requested property ordering and number serialization rules with the OpenKeyStore example; done means an agreed ES6-compatible approach is implemented in JSON-B or its reference implementation.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.