Package com.kazforge.jsonapi.jackson3
Class JsonApiDocumentReader
java.lang.Object
com.kazforge.jsonapi.jackson3.JsonApiDocumentReader
Reads JSON:API JSON into a validated
JsonApiDocument using an explicit DocumentReadContext.
Decoding is token-driven through public core constructors, then aggregate validation runs
before any document is returned. Unknown structural members are discarded on read using the bound
validation policy, while recognized standard, extension, allowed-profile, and @ members
still decode and validate; aggregate validation of directly constructed models and all writer
paths remains strict. Convenience overloads close only parsers they create; caller-owned InputStream and JsonParser instances remain open.
-
Method Summary
Modifier and TypeMethodDescriptioncom.kazforge.jsonapi.document.DocumentReadContextcontext()Read context bound to this reader.com.kazforge.jsonapi.core.model.JsonApiDocumentreadValue(byte[] utf8Json) Reads and validates one JSON:API document from UTF-8 JSON bytes.com.kazforge.jsonapi.core.model.JsonApiDocumentreadValue(InputStream utf8Stream) Reads from a caller-owned UTF-8 stream.com.kazforge.jsonapi.core.model.JsonApiDocumentReads and validates one JSON:API document from JSON text.com.kazforge.jsonapi.core.model.JsonApiDocumentreadValue(tools.jackson.core.JsonParser parser) Reads one JSON:API document from a caller-owned parser starting at the current token (or the next token if none is current).
-
Method Details
-
context
public com.kazforge.jsonapi.document.DocumentReadContext context()Read context bound to this reader. -
readValue
Reads and validates one JSON:API document from JSON text. -
readValue
public com.kazforge.jsonapi.core.model.JsonApiDocument readValue(byte[] utf8Json) Reads and validates one JSON:API document from UTF-8 JSON bytes. -
readValue
Reads from a caller-owned UTF-8 stream. The stream is not closed; only the parser created for this call is closed. -
readValue
public com.kazforge.jsonapi.core.model.JsonApiDocument readValue(tools.jackson.core.JsonParser parser) Reads one JSON:API document from a caller-owned parser starting at the current token (or the next token if none is current). Does not require end-of-input after the document, so callers may sequence multiple root values. The parser is not closed.
-