eclipse-ee4j / eclipse-ee4j/yasson
Support [De]serialisation of Streams
- Dominant language
- Java
- Stars
- 218
- Forks
- 109
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 9
Description
**Is your feature request related to a problem? Please describe.**
When using large datasets it's often preferred to use Streams to reduce memory consumption. Currently, using `Stream#of`, `List#of#stream`, etc., in v3.0.4 results in:
```
jakarta.json.bind.JsonbException: Error accessing getter 'isParallel' declared in 'class java.util.stream.AbstractPipeline'
at org.eclipse.yasson.internal.model.PropertyModel.createReadHandle(PropertyModel.java:513)
at org.eclipse.yasson.internal.model.PropertyModel.(PropertyModel.java:157)
at org.eclipse.yasson.internal.ClassParser.lambda$parseProperties$0(ClassParser.java:70)
...
```
**Describe the solution you'd like**
A stream of objects [de]serialise into/from a JSON array of objects.
**Describe alternatives you've considered**
N/A
**Additional context**
Current workaround it to use `Stream#asList` but that defeats the point of using Streams.
Contributor guide
Assessment
This issue has not been assessed yet.