JAX-RS marshall/unmarshall JSON array without root object -
i have following class.
public class observations { public string[] observations; }
which have annotated consume/produce xml , json using jax-rs webservice. i'm using jackson.
public class observations { @xmlelement(name="observation") @jsonproperty("observations") public string[] observations; }
the issue i'm getting following output when serializing class:
{ "observations": [ "one", "two" ] }
and want or provide:
["one", "two"]
what should in annotation want?
ta
Comments
Post a Comment