oops that should have said "and that object class has the properties you previously wanted as your parameters"
that makes more sense! On Fri, Nov 28, 2014 at 4:36 PM, Aaron Titus <[email protected]> wrote: > Yes, this is correct. Incoming REST parameters when simple strings should > be specified with the URL for get requestss and with a post they can be > form encoded. If you don't want to form encode but instead send a json > object then change the method so it takes a single object as its parameter, > and that object class has the parameters you want. This is the simplest > way to do it and will save Sergey some work ;-) > > > On Fri, Nov 28, 2014 at 10:34 AM, Benson Margulies <[email protected]> > wrote: > >> Then you'd need your parameter to be, say, Map<String, Object>, or >> some class, not a plain string. >> >> On Fri, Nov 28, 2014 at 10:18 AM, Aaron Titus <[email protected]> wrote: >> > curly braces are object syntax. If you are using JAXB deserializer, it >> > needs an object to create, and therefore you'll have curly braces in the >> > json. The object can have properties that are primitives like boolean or >> > plain String objects and it works just fine for me but as I have stated >> > before I'm using JAXB annotations so this may have something to do with >> it. >> > I have not tried it with a pure Jackson mapper and JSON-only >> annotations. >> > >> > >> > On Fri, Nov 28, 2014 at 9:49 AM, Benson Margulies <[email protected] >> > >> > wrote: >> > >> >> Of course it won't work with brackets. That is not the json syntax for >> a >> >> plain string. >> >> On Nov 28, 2014 9:47 AM, "Aaron Titus" <[email protected]> wrote: >> >> >> >> > I think the key is that I am using the JAXB annotations, and not the >> >> JAX-RS >> >> > ones. I am using jackson 2.2.3 now, but it was working also before >> with >> >> > 1.9. You include the databind jar, and then the JAXB serializer >> can use >> >> > the Jackson Provider. Specifically I'm using this one: >> >> > >> >> > com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider >> >> > >> >> > >> >> > >> >> >> > >
