After this tread I have to make another one because I need help to deserialize Json. The problem is how to get the items right. This is what I made up so far: entity query entity items_ generalized from restservices.primitive (no attributes) entity item_ (attributes _id,name) association query * > * items_ named items association items_ * > 1 item_ name item The problem is the link between the items and the item ("1", "2"), I don't know how to do this. I have made all the version in the domain model I came up with but nothing works. The following Json needs to be deserialized, does anyone has a suggestion? { "items": { "1": { "id": 1, "name": "Accounting / Financieel", "functions": [ { "id": 19, "name": "Vermogensbeheer", "groupId": 1, "isAdministrative": true, "isTechnical": false }, { "id": 20, "name": "Verzekering (medewerker)", "groupId": 1, "isAdministrative": true, "isTechnical": false } ] }, "2": { "id": 2, "name": "Administratief / Secretarieel", "functions": [ { "id": 21, "name": "Administratief algemeen", "groupId": 2, "isAdministrative": true, "isTechnical": false }, { "id": 412, "name": "Administratief medewerker", "groupId": 2, "isAdministrative": true, "isTechnical": false } ] }}}
asked
Thijs Schoemaker
2 answers
1
Something like this should work i think:
request (non persistent)
Association
request * > 1 _items (name of association "items")
_items (non persistent)
Association
_items 1 > * _subitems (name of association _item_numbers)
_subitems (non persistent)
Attributes
_id (number)
name (string)
Association
_subitems * > 1 _functions (named "functions")
_functions (non persistent)
Attributes:
_id (number)
name (string)
groupId (number)
isAdministrative (boolean)
isTechnical (boolean)
answered
Marnix Puijker
0
Hi Thijs,
items is an object and not an array so my question is are "1" and "2" the only other objects inside this object? Or are there other options possible too?