stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reka Thirunavukkarasu <>
Subject Rest endpoint not properly converting the objects into Json
Date Mon, 27 Jan 2014 11:15:23 GMT

While i worked on the cli issue [1], found that json which received from
the Rest endpoint is not backward compatible with the object again. Eg:
Rest call is:

    public Partition[] getPartitions () throws RestAPIException {

        return ServiceUtils.getAvailablePartitions();

The Partition Pojo is:

public class Partition {

    public String id;

    public int partitionMin;

    public int partitionMax;

    public String provider;

    public List<PropertyBean> property;

This should result as:


but the actual response is when getPartitions from SM without the array
type for the property:


So that the parser failed in cli to parse this string into Object. When i
tested it with more than one property, it takes the property as an array.

Did anyone observer such behavior? How can we handle this?



Reka Thirunavukkarasu
Software Engineer,
WSO2, Inc.:,
Mobile: +94776442007

View raw message