public class ValidationUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
ensureNotError(com.fasterxml.jackson.databind.ObjectMapper mapper,
com.fasterxml.jackson.databind.JsonNode resourceNode)
Ensures that provided node does not hold 'errors' attribute.
|
static void |
ensureValidResource(com.fasterxml.jackson.databind.JsonNode resource)
Asserts that provided resource has required 'data' or 'meta' node.
|
static boolean |
isRelationshipParsable(com.fasterxml.jackson.databind.JsonNode dataNode)
Returns
true in case 'DATA' note has 'ID' and 'TYPE' attributes. |
public static void ensureValidResource(com.fasterxml.jackson.databind.JsonNode resource)
resource - resourcepublic static boolean isRelationshipParsable(com.fasterxml.jackson.databind.JsonNode dataNode)
true in case 'DATA' note has 'ID' and 'TYPE' attributes.dataNode - relationship data nodetrue if node has required attributes, else falsepublic static void ensureNotError(com.fasterxml.jackson.databind.ObjectMapper mapper,
com.fasterxml.jackson.databind.JsonNode resourceNode)
resourceNode - resource nodeResourceParseExceptionCopyright © 2017. All rights reserved.