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.

Reply via email to