I have an API layout that includes an object with varying properties. This object is a collection of security permissions that a user has. It is used by the web client to determine which items to show. So, the json looks like:
“user_info”:
{
“entities”:
{
“entity1”:
{
“description”: “description of this entity”,
“actions”: [
“action1”,
“action2”
]
},
“entity2”:
. . .
So each entity represents a security permission that the user has and is used by the web client to know how to represent the interface. The API server does not use this information, but validates against the actual user security. I can easily model the individual entity portion since it has a predetermined format, but cannot see how to model the repeating entity section of the entities object within the user_info object. The entity “list” does not have a predetermined set, but is actually database driven.