[ardoJSON] New feature: Specify the name of the object in the JSON file
Forge component by Ricardo Silva
Published on 24 Oct 2018
Hi Ricardo,

Is it possible to add an optional parameter to the action Outsystems2JSON to specify the name of the object (instead of always assuming that has the same name of the structure)?

We need this because we need to build and maintain an API, with different versions, in the same espace. With time, the objects will change but we need to maintain retrocompatibility.

For example:

- Date
- Description

In the next version:

- Date
- Description
- Author

We don't want that our apps change the name of their dictionaries only because we aren't able to define the name of the object in JSON. 

Is it possible to do that change? If you don't desire that change, can you just give me a quick hint in your code on where I could do myself that change?

Can you please elaborate on the specifics of what you want to implement?

JSON objects don't have a name and all matching in ardoJSON is done by structure, not by name of the Record.

I look at attribute names, not Record name.

Also, you should specifically version your JSON API instead of allowing for legacy calls.
Rank: #29
I think what Ricardo mentioned is that the generated json never contains the name of the structure. Can you post a json where it is appearing?

Also if its just adding attributes it should not be a "breaking change" that required you to create a separate structure. A good rest client should ignore unknown attributes.

João Rosado
Rank: #14473
I rest my case :)

The names, in my case, were always the same and I never noticed how it really worked.

PS - I've deleted my previous post because it was dumb and if other people read this thread, not confuse them even more.