History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: XSTR-434
Type: Improvement Improvement
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Daniel.Sun
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
XStream

add an option to hide the class name in the json

Created: 22/Sep/07 09:58 PM   Updated: 22/Sep/07 09:58 PM
Component/s: Core
Affects Version/s: 1.2.2
Fix Version/s: 1.x Maintenance


 Description  « Hide
Box has a list of Product
public class Box {

private Integer id;

private String name;

private List<Product> products = new ArrayList<Product>();

// getters and setters
}

I serialize the box instance to json, the result is
{"box":{"id":"1","name":"box1","products":{"product":[
{"id":"1","name":"product1","price":"11.0"},

{"id":"3","name":"product3","price":"33.0"}

]
}}}

but what I want is( without alias of class name: "box" , "product")
{"id":"1","name":"box1", "products": [
{"id":"1","name":"product1","price":"11.0"},

{"id":"3","name":"product3","price":"33.0"}

]
}

The tree of Ext requires the latter form

So if possible, please provide a option to hide the class names, thanks



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.