You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@johnzon.apache.org by "Romain Manni-Bucau (JIRA)" <ji...@apache.org> on 2019/08/07 17:10:00 UTC

[jira] [Resolved] (JOHNZON-229) Mapper should support serializing java.util.stream.Stream

     [ https://issues.apache.org/jira/browse/JOHNZON-229?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Romain Manni-Bucau resolved JOHNZON-229.
----------------------------------------
       Resolution: Fixed
         Assignee: Romain Manni-Bucau
    Fix Version/s: 1.1.14

Fixed the most trivial possible way: considering streams (+ primitive flavors) as json arrays.

Note that on the deserialization side it stays a lazily materialized stream (Stream.of(1) is flatmap on the actual stream) enabling to delay materialization of the stream which can save time and memory in several cases and does not mutate the stream nature itself - but prevent to use thread local or so without forcing an eager valorization.

 

//cc [~struberg] if you can review my previous comment and the "fix" it would enable to validate the "fixed" state - also happy to move the topic on the list if you think we can need some config to support it more accurately.

> Mapper should support serializing java.util.stream.Stream
> ---------------------------------------------------------
>
>                 Key: JOHNZON-229
>                 URL: https://issues.apache.org/jira/browse/JOHNZON-229
>             Project: Johnzon
>          Issue Type: Improvement
>          Components: Mapper
>    Affects Versions: 1.1.13
>            Reporter: Steven Walters
>            Assignee: Romain Manni-Bucau
>            Priority: Major
>             Fix For: 1.1.14
>
>
> Currently, Mapper does not support serializing java.util.stream.Stream
> Since Johnzon uses Java 1.8 as the minimum supported version (which is the minimum version that defines Stream).
> This has come up quite a bit in combination with JPA 2.2 which supports Stream as the return of a QueryResult (in addition to List)



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)