You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Sergey Beryozkin <sb...@gmail.com> on 2011/04/11 11:46:38 UTC
Re: Support for Json arrays
Forwarding to users list...
I've added a couple of tests and it is all working with Jettison
1.3-SNAPSHOT, embedded qualified and unqualified arrays are read properly, I
think using unqualified arrays was working before too, and Joerg's fix has
also contributed to qualified arrays being read properly
Cheers, Sergey
On Mon, Feb 14, 2011 at 5:10 PM, Kannan Ramasamy <ra...@gmail.com>wrote:
>
> Hi
>
> @XmlAccessorType(XmlAccessType.PUBLIC_MEMBER)
> @XmlRootElement(name = "store")
> public class Store {
> private String description;
> private Set<Image> images;
> private Set<Keyword> keywords;
>
> @XmlElement(name = "keyword")
> @XmlElementWrapper(name = "keywords")
> public Set<Keyword> getKeywords() {
> return this.keywords;
>
> }
>
> @XmlElement(name = "image")
> @XmlElementWrapper(name = "images")
> public Set<Image> getImages() {
> return images;
> }
>
>
> }
>
>
> JSON INPUT
> ========
> {
> "ns1.store": {
> "ns1.description": "links offers a variety of office",
> "ns1.images": {
> "ns1.image": [
> {
> "ns2.imageUri": "http:localhost:\10352.jpg",
> "ns2.height": 342,
> "ns2.type": "thumbnail",
> "ns2.width": 380
> },
> {
> "ns2.imageUri": "http:localhost:\10352.jpg",
> "ns2.height": 40,
> "ns2.type": "logoLarge",
> "ns2.width": 150
> }
> ]
> },
> "ns1.keywords": {
> "ns1.keyword": {
> "ns1.value": "34inks"
> },
> "ns1.keyword": {
> "ns1.value": "35inks"
> }
> }
> }
> }
>
>
> If i try to pass the above mentioned json data. I am getting as empty array
> after unmarshalling.
>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Support-for-Json-arrays-tp576369p3384766.html
> Sent from the cxf-dev mailing list archive at Nabble.com.
>