0

I'm using JQuery to post a JSON Object (3 levels deep) to Play!

$.post("saveIt", {id1: {key1: {val1: ...}...}...}, function ...

how do I access this structure from within Play! / Java?

1 Answer 1

0

Use gson in your controller method to deserialize it into a java object

MyObject myObject = new GsonBuilder().create().fromJson(params.get("saveIt"), MyObject.class);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.