JSON name should default to Attribute name

On our radar

When adding a new Structure Attribute the JSON name should default to the Attribute Name.

The JSON name should also appear in the Attribute properties panel.

Created on 23 Jan 2018
Comments (4)

But that is exactly what happens?? When adding a new Attribute to a structure, the JSON name defaults to the Attribute name.

Hi Killian, I'm using Studio v10.0.717. If I manually right click a structure and add an a new structure attribute the JSON name is NOT populated at all. If I "import" a structure from JSON then, yes, the JSON name will be populated. Thereafter, manually adding any new attribute to a structure does not populate the JSON name.

Regards, John.

Ah, I see what you mean. The reason for this is that "Name in JSON" defaults to the Attribute name. Only if you want a different JSON name this can be set manually. This makes sense imho, since what would you want to happen functionally when filling it directly with the Attribute name, then later changing the Attribute name (e.g. because of a typo)? The JSON name is not shown directly in the interface (which is sensible because structures are used for a lot more than just JSON), and this could lead to hard to detect bugs.

When you do an import from JSON it is sensible to have the property filled, since you might decide to change the name used in SS (e.g. because the JSON is external to your environment and you need your Attributes to adhere to some company rules or the like), but you still want to be able the JSON afterwards.

Hi Kilian, I understand. I didn't know the JSON name 'defaulted' to the attribute name, so that is good to know for the future.

We have a couple of large flat structures from 3rd parties where the attributes have very long JSON names (>130 characters). Not seeing the JSON names used makes you think they have not been setup correctly.

Regards, John.