Closed ilumer closed 4 years ago
But isn't your content here cyclic, with a.elStream
pointing back to a
? That would lead to infinite recursion. I am not sure how else it should work; either it is necessary to prevent cyclic references with @JsonIgnore
on right fields, or to use Object Id handling (@JsonIdentityInfo
).
As to including jackson-datatype-jdk8
: without it Stream
is only seen as POJO, probably with parallel
(from boolean isParallel()
).
Thanks for replaying,I just think Stream
is only seen as POJO, so it should not throw StackOverflowError. I can not find that it handle the stream
specially, I should read the doc more carefully.
I try to use stream api to get all elements recursive, but this method throw a infinite recursion (StackOverflowError)。I can not find problem in my code,I try to build a small code to reproduce this scenario,I find the reason that produce error is I register the
Jdk8Module
. If i remove this module , it work right. Can you give me some suggestions, thank you.jackson-datatype-jdk8 2.9.0