I'll start off by saying excellent job everyone on writing this spec!
I was proofreading it to catch any possible errors and only found a few
things that are all very minor,
1.3:
"Support Support and integration with..."
should be
"Support and integration with..."
3.7.1:
"When only public getter/setter method without corresponding field is
present in the class, ..."
should be
"When only public getter/setter methods without corresponding fields are
present in the class, ..."
3.17.1:
Figure 2: Example Type resolution is showing a Hello World Java program
rather than the intended example. Does anyone have a copy of what the
actual example was intended to be or do we need to write one?
4.4:
refers to JsonbConfig::withStrictIJSONSerializationCompliance, however the
method on JsonbConfig is actually called "withStrictIJSON".
Also, this section refers to configuration option
"jsonb.i-json.strict-ser-compliance", but the constant value for
javax.json.bind.JsonbConfig.STRICT_IJSON is "jsonb.strict-ijson".
4.5:
"The name of a parameter can be changed annotating given parameter with
JsonbProperty annotation."
should be
"The name of a parameter can be changed by annotating the given parameter
with the JsonbProperty annotation."
javax.json.bind.JsonbConfig:
Given that JsonbConfig.getProperty makes the requirement "Attempting to
get an undefined property will result in a JsonbException being thrown",
so that you can never have a return value for an undefined property name,
what is the point of having it return Optional rather than Object?
public final Optional<Object> getProperty(String name)
Note that getAtMap() returns property values within the map as Object, not
Optional. Seems like getProperty ought to be the same.
javax.json.bind.adapter.JsonbAdapter
Sample 2 has
JsonbAdapter<Box<T>, Integer<T>>
should be
JsonbAdapter<Box<T>, Integer>
javax.json.bind.annotation.JsonbCreator
There are couple of minor grammatical errors in
"Annotation provides way how to use custom constructor or factory method
to create instance of the associated class."
I'd recommend rewriting it,
"This annotation identifies the custom constructor or factory method to
use when creating an instance of the associated class."
It seems awkward that the spec has two ways to set nillable annotatively:
@JsonbNillable
and
@JsonbProperty(nillable=true)
I understand the two have different targets:
@Target(value={ANNOTATION_TYPE,TYPE,PACKAGE})
vs
@Target(value={ANNOTATION_TYPE,METHOD,FIELD,PARAMETER})
Would it be clearer to remove nillable from @JsonbProperty and just allow
@JsonbNillable in all of the targets?
From: Dmitry Kornilov <dmitry.kornilov_at_oracle.com>
To: <users_at_jsonb-spec.java.net>
Date: 05/26/2016 04:12 AM
Subject: [jsonb-spec users] Public Review
Hi,
JSONB spec Public Review is posted!
https://jcp.org/en/jsr/detail?id=367
Congratulations and thanks to everyone who participated in the spec
development! Great job!
Thanks,
Dmitry Kornilov
JSONB spec lead
@m0mus