Pair up data [message #1729290] |
Tue, 12 April 2016 15:22 |
Nattapon Thathong Messages: 1 Registered: April 2016 |
Junior Member |
|
|
Hi,
I'm a newbie to Acceleo.
I have a set of json data:
{
"list": [
{
"name" : "test_1",
"type": "a"
},
{
"name" : "test_2",
"type": "b"
},
zd,
{
"name" : "test_2",
"type": "c"
}]
}
I want to group the data that has the same type, for example,
test_1 and test_3 have the same type "a".
I want the output to be like ,
a: test_1, test_3
b: test_2
c: test_3
Can someone help me?
|
|
|
Re: Pair up data [message #1729337 is a reply to message #1729290] |
Wed, 13 April 2016 08:18 |
|
Hi,
It doesn't seem like you have a model at all, so Acceleo (which only accepts EMF models as input) doesn't look like the solution for you.
If your requirements as are simple as that, all you would need is a library to parse your data (such as Gson), then simply iterate over it to store your data according to its type, then print it as you like.
If not, you will have to transform your json into an EMF model before you can use it with acceleo or another eclipse m2t project.
Laurent Goubet
Obeo
|
|
|
Powered by
FUDForum. Page generated in 0.03251 seconds