java - Convert JsonNode object to Map -



java - Convert JsonNode object to Map -

i have c# programme sends me json object. i'm making java play website capture post data. right info jsonnode object need convert map.

i'm using com.fasterxml.jackson.databind.jsonnode

here correctly capture jsonnode object:

public static result index() { jsonnode json = request().body().asjson();

now have object need figure out how convert map can magic on it. later i'll want convert map json object sent in response.

i've been looking in documentation, methods available don't scream solution.

here documentation i've been referencing particular jsonnode object: http://fasterxml.github.io/jackson-databind/javadoc/2.2.0/com/fasterxml/jackson/databind/jsonnode.html

got here trying find reply myself. dug little deeper , found bit reply here

basically utilize objectmapper convert value you:

objectmapper mapper = new objectmapper(); map<string, object> result = mapper.convertvalue(jsonnode, map.class);

java json playframework-2.2

Comments

Popular posts from this blog

php - How to pass multiple values from url -

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

database - php search bar when I press submit with nothing in the search bar it shows all the data -