Is the document to be validated loaded completely in memory #995
-
It is not clear to me if the document to be validated loaded completely in memory or it is processed in a streaming mode. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Yes it's completely loaded into memory with a call to Jackson's It's not possible to enable a streaming mode. I don't really have an idea of how you can implement this generically. If what you have is a document with an array of objects, you could stream and process each object individually with a json schema for each object. |
Beta Was this translation helpful? Give feedback.
-
Indeed the JSON file exists of a header object and an array with a huge amount of array elements. |
Beta Was this translation helpful? Give feedback.
Yes it's completely loaded into memory with a call to Jackson's
ObjectMapper.readTree
. The api is such that it calls validate with theJsonNode
of the current instance data and theJsonNode
of the root instance data.It's not possible to enable a streaming mode. I don't really have an idea of how you can implement this generically.
If what you have is a document with an array of objects, you could stream and process each object individually with a json schema for each object.