Class JsonApiPatchDtoReader
readValue(java.lang.String, java.lang.Class<T>) decodes and aggregate-validates through a factory-composed DocumentReadContext (PrimaryDataKind.RESOURCE with DocumentUsage.UPDATE_REQUEST), then binds the whole update into the PATCH DTO: patchable
attributes and relationships declared as PatchPresence receive
omitted(), present(value), or present(null) (explicit JSON null /
null relationship linkage), and the identifier binds through IdentifierConverter. fromDocument(com.kazforge.jsonapi.core.model.JsonApiDocument, java.lang.Class<T>) binds without re-validation. Codec and aggregate failures stay JsonApiDocumentReadException; bind failures stay JsonApiMappingException with resource-relative pointers and are
never prefixed with /data.
Close/ownership rules match JsonApiDocumentReader: convenience overloads close parsers
they create; caller-owned streams and parsers stay open. Construct via JsonApiJackson3.patchDtoReader(JsonMapper) or its overloads. Safe for concurrent use once
created.
-
Method Summary
Modifier and TypeMethodDescription<T> TfromDocument(com.kazforge.jsonapi.core.model.JsonApiDocument document, Class<T> dtoType) Binds an already-validated document without re-parsing or re-validating.fromDocument(com.kazforge.jsonapi.core.model.JsonApiDocument document, tools.jackson.databind.JavaType dtoType) Binds an already-validated document without re-parsing or re-validating, preserving fullJavaTypeparameterization.<T> TDecodes, validates, and binds the UTF-8 JSON:API update document in the given bytes.readValue(byte[] utf8Json, tools.jackson.databind.JavaType dtoType) Byte-array overload ofreadValue(String, JavaType).<T> TreadValue(InputStream utf8Stream, Class<T> dtoType) Decodes, validates, and binds one JSON:API update document from a caller-owned UTF-8 stream.readValue(InputStream utf8Stream, tools.jackson.databind.JavaType dtoType) Stream overload ofreadValue(String, JavaType).<T> TDecodes, validates, and binds the JSON:API update document in the given string.Decodes, validates, and binds using aJavaType, preserving full parameterization.<T> TDecodes, validates, and binds one JSON:API update document from a caller-owned parser.readValue(tools.jackson.core.JsonParser parser, tools.jackson.databind.JavaType dtoType) Parser overload ofreadValue(String, JavaType).
-
Method Details
-
readValue
Decodes, validates, and binds the JSON:API update document in the given string. -
readValue
Decodes, validates, and binds the UTF-8 JSON:API update document in the given bytes. -
readValue
Decodes, validates, and binds one JSON:API update document from a caller-owned UTF-8 stream. The stream is not closed. -
readValue
Decodes, validates, and binds one JSON:API update document from a caller-owned parser. The parser is not closed. -
readValue
Decodes, validates, and binds using aJavaType, preserving full parameterization. -
readValue
Byte-array overload ofreadValue(String, JavaType). -
readValue
Stream overload ofreadValue(String, JavaType). -
readValue
public Object readValue(tools.jackson.core.JsonParser parser, tools.jackson.databind.JavaType dtoType) Parser overload ofreadValue(String, JavaType). -
fromDocument
public <T> T fromDocument(com.kazforge.jsonapi.core.model.JsonApiDocument document, Class<T> dtoType) Binds an already-validated document without re-parsing or re-validating. Requires non-nullDocumentData.SingleResourceprimary data; other primary-data states throwIllegalArgumentException. -
fromDocument
public Object fromDocument(com.kazforge.jsonapi.core.model.JsonApiDocument document, tools.jackson.databind.JavaType dtoType) Binds an already-validated document without re-parsing or re-validating, preserving fullJavaTypeparameterization. Requires non-nullDocumentData.SingleResourceprimary data; other primary-data states throwIllegalArgumentException.
-