0

I am developing log library that serializes java objects into JSON, however, I faced with the problem that some objects can refer to themselves and eventually might recursively create infinite JSON. I need a functionality where I can specify the depth of serialization or somehow prevent recursion. Can someone suggest any solution?

P.S. Jackson and GSON don't seem to have this functionality.

Kuan B
  • 3
  • 1
  • https://stackoverflow.com/questions/10191671/jackson-json-serialization-recursion-avoidance-by-level-defining – shmosel Nov 16 '21 at 06:52
  • Does this answer your question? [Jackson JSON serialization, recursion avoidance by level defining](https://stackoverflow.com/questions/10191671/jackson-json-serialization-recursion-avoidance-by-level-defining) – Robert Nov 17 '21 at 15:37

0 Answers0