jsonapi-converter
jsonapi-converter copied to clipboard
Potential fix for Issue #30
This PR is a little lacking, but it does fix the unit test.
The PR is lacking because in the absence of a resource linkage, it will invoke ObjectMapper.readTree(byte[])
to determine the cardinality before invoking readDocument[Collection]
. The result of readTree(byte[])
is discarded. Of course, readTree(byte[])
will be invoked again, on the same content, inside of readDocument[Collection]
.
So this PR results in an extra call to readTree
when resolving relationships that do not have resource linkages. Maybe somehow the result could be cached, and re-used. I'm not sure if the ResourceCache
accommodates that use case or not.