Skip to content

@wulfgarpro /gist:1220791
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Using Jackson's TreeModel to parse types from JSON
ObjectMapper mapper = new ObjectMapper();
JsonNode rootNode = mapper.readValue(compoundCriteria,
JsonNode.class);
if(rootNode.has("ContextualCriteria"))
{
JsonNode contextualNode = rootNode.get("ContextualCriteria");
ContextualCriteria contextualCriteria = (ContextualCriteria)
fromJson(contextualNode.toString(),
ContextualCriteria.class);
query.addCriteria(contextualCriteria);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.