jakartaee / jakartaee/jsonb-api
JsonbSerializer's javadoc example is most likely misguided
- Dominant language
- Java
- Stars
- 95
- Forks
- 41
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 35
Description
[This line of JsonbSerializer's javadoc's](https://github.com/eclipse-ee4j/jsonb-api/blob/b29bc1edff86b66f2b57476b394e5da19f47ac40/api/src/main/java/javax/json/bind/serializer/JsonbSerializer.java#L40) exemplifies its use by calling the method `SerializationContext.serialize(T object, JsonGenerator generator)` , that is "_intended to serialize inside JSON_ARRAYs_"1, which is not the case.
The intended example is more likely
`ctx.serialize("boxInnerObject",boxInnerObject,generator);`
which uses the `serialize` version with a key parameter.
1 - https://javaee.github.io/javaee-spec/javadocs/javax/json/bind/serializer/SerializationContext.html#serialize-T-javax.json.stream.JsonGenerator-
Contributor guide
Research direction
Open api/src/main/java/javax/json/bind/serializer/JsonbSerializer.java at the referenced javadoc example and compare it with the SerializationContext.serialize overloads linked in the issue. Update the example to use the overload with a key parameter, then verify that the javadoc matches the intended serialization context.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100