java - Read array of unknown objects in REST service -
how write rest service below data post request? templates can have data, array of data.
{ "name":"jose", "surname":"john", "templates":[ { "template1":"333", "any":"any" }, { "anything":"anything", "test":"tafsasdf" } ] }
cxf
knows how convert such string nested map<string, object>
. need have jackson
libraries in classpath , annotate server method @requestbody
.
something this:
@requestbody public void somemethod(map<string, object> json objects) { // code here }
Comments
Post a Comment