0
I am consuming a JSON, and I want to use the keys of this JSON as options of a select, but the nomenclature is in camelCase and without accents, ex:
"destaques": [
{
"fornecedoresCompany": [
{
"5OouMaisFuncionarios": "value..."
}
]
},
]
Is there a problem if I use it as follows?
"Destaques": [
{
"Fornecedores Company": [
{
"5O ou Mais Funcionários": "value..."
}
]
},
]
If it is not correct to use in this way, is there any other solution? With javascript? I need to use the key as an option for it to be dynamic, it is no use only to perform a validation in the code comparing and changing the string.
The problem of variables with space is if you need to deserialize, no language accepts space in the nomenclature of variables and you will have to do a complex mapping to solve this. Accents are accepted, but in some cases they can be read differently in different editors. (encoding problem)
– William John Adam Trindade
Related: https://answall.com/q/313493/64969
– Jefferson Quesado