If the deserialization is abstracted away, it may protect the code from future changes.
Also, by leveraging some advanced Jackson features, we can reduce the type checking, particularly having to use an Object when the value may be a String or array of String.
If we deserialize as an array every time, when working with a primaryKey for example, no casting or type checking is required.
The json can still be a string or an array of strings.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If the deserialization is abstracted away, it may protect the code from future changes.
Also, by leveraging some advanced Jackson features, we can reduce the type checking, particularly having to use an
Object
when the value may be aString
or array ofString
. If we deserialize as an array every time, when working with aprimaryKey
for example, no casting or type checking is required. The json can still be a string or an array of strings.See this example -
https://github.com/frictionlessdata/tableschema-java/compare/master...savantly-net:simplify_and_leverage_more_jackson
Please preserve this line to notify @iSnow (lead of this repository)