Spring MVC + XStream + JAVA serverside integration
Spring MVC + XStream + JAVA serverside integration
soroushhakami
Posts: 10Questions: 0Answers: 0
Hello all,
I'm trying to create a JSON-string looking like the 'objects.txt' one that you get with the download package using XStream on the serverside in a Spring MVC-project. My
Currently I'm creating an array of objects, but the formatting does not look exactly the same as the one in objects.txt
Does anyone have experience on doing this, or know of any useful resources?
objects.txt
[code]
{ "aaData": [
{
"engine": "Trident",
"browser": "Internet Explorer 4.0",
"platform": "Win 95+",
"version": "4",
"grade": "X"
},
{
"engine": "Trident",
"browser": "Internet Explorer 5.0",
"platform": "Win 95+",
"version": "5",
"grade": "C"
},
{
"engine": "Trident",
"browser": "Internet Explorer 5.5",
"platform": "Win 95+",
"version": "5.5",
"grade": "A"
},
] }
[/code]
I'm trying to create a JSON-string looking like the 'objects.txt' one that you get with the download package using XStream on the serverside in a Spring MVC-project. My
Currently I'm creating an array of objects, but the formatting does not look exactly the same as the one in objects.txt
Does anyone have experience on doing this, or know of any useful resources?
objects.txt
[code]
{ "aaData": [
{
"engine": "Trident",
"browser": "Internet Explorer 4.0",
"platform": "Win 95+",
"version": "4",
"grade": "X"
},
{
"engine": "Trident",
"browser": "Internet Explorer 5.0",
"platform": "Win 95+",
"version": "5",
"grade": "C"
},
{
"engine": "Trident",
"browser": "Internet Explorer 5.5",
"platform": "Win 95+",
"version": "5.5",
"grade": "A"
},
] }
[/code]
This discussion has been closed.
Replies
I circumvented this and then made a new controller using GSON to format my Java-objects into JSON-strings, worked like a charmed.