-1
How do I get the properties names of a Json using the library Gson?
Input example:
{
"Ficha":[
{
"nome":"nome",
"sobrenome":"sobrenome",
"idade":"idade",
"endereco":"endereco",
"empresa":"empresa",
"telefones":[
{
"residencial":"residencial"
},
{
"celular":"celular"
}
]
}
]
}
Expected exit:
["nome", "sobrenome", "idade", "endereco", "empresa", "telefones", ...
look misspelled have to print so ["name","last name","age"].... the names of the properties
– Pedro Januario
You talk in the library
gson
, then the language is Java, not Javascript, correct? If so, please remove the tagjavascript
of the question.– carlosfigueira