eclipse-ee4j / eclipse-ee4j/yasson
Allow handling of "JsonStructure" as input for "fromJson"
- Dominant language
- Java
- Stars
- 218
- Forks
- 109
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 9
Description
Hey there,
I just requested a new feature (see [jsonb-api/issues/111](https://github.com/eclipse-ee4j/jsonb-api/issues/111)) for the JSON-B API to allow [javax.json.JsonStructure](https://github.com/eclipse-ee4j/jsonp/blob/master/api/src/main/java/javax/json/JsonStructure.java) as input for deserialization
How about implementing this already in [JsonBinding.java](https://github.com/eclipse-ee4j/yasson/blob/master/src/main/java/org/eclipse/yasson/internal/JsonBinding.java) as a custom feature for Yasson?
```java
public class JsonBinding implements Jsonb {
...
T fromJson(JsonStructure jsonStruct, Class type) throws JsonbException;
T fromJson(JsonStructure jsonStruct, Type runtimeType) throws JsonbException;
}
```
Cheers,
Michael
Contributor guide
Research direction
Start with src/main/java/org/eclipse/yasson/internal/JsonBinding.java and inspect the existing fromJson entry points. Determine how JsonStructure inputs should be handled for both Class and Type runtimeType overloads; done means both proposed overloads support deserialization consistently with the existing Jsonb behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100