5
The application receives a JSON file, already validated, and must display it to the user who is a programmer.
I would like to display JSON as on this validation and beautify site JSON.
So I wanted this JSON:
{"glossary": {
"title": "example glossary",
"GlossDiv": {
"title": "S",
"GlossList": {
"GlossEntry": {
"ID": "SGML",
"SortAs": "SGML",
"GlossTerm": "Standard Generalized Markup Language",
"Acronym": "SGML",
"Abbrev": "ISO 8879:1986",
"GlossDef": {
"para": "A meta-markup language, used to create markup languages such as DocBook.",
"GlossSeeAlso": ["GML", "XML"]
},
"GlossSee": "markup"}}}}
}
It was displayed the way below to make it more readable to the programmer, like this:
Note that there is the possibility to expand or not the node.
Does anyone know any application that does this?
Note: I’m using php.
In Laravel has an auxiliary method dd() that displays JSON on the indented screen, tries to take a look at the code, think it can help.
– Leandro Paiva
@zwitterion has to be in
json
? If it isarray
I have an alternative. If you want I can post a reply– DNick
Hi @Djalmamanfrin yes can only be a JSON. But if you want to put there the code for the array. Maybe someone needs or even me in another scenario.
– zwitterion