In File
You can paste the JSON into some third-party tools and format it.
For example:
Json Crack
Json Crack
VS Code
VSCode
Note: you need to first select the language mode as JSON.
In Game
1. Create a 'Text Input' Object
2. Set the 'Type' properties to 'Textarea'
3. Output JSON
Output the code of the entire JSON object.
Set Text to JSON.ToBeautifiedString
If you want to test partial you can also use.
Set Text to JSON.GetAsBeautifiedString("path")
4. For example:
JSON.ToBeautifiedString
{
"a001": {
"ID": "a001",
"Name": "Apple",
"Cost": 12
},
"a002": {
"ID": "a002",
"Name": "Banana",
"Cost": 24
},
"a003": {
"ID": "a003",
"Name": "Carrot",
"Cost": 32
}
}
JSON.GetAsBeautifiedString("a001")
{
"ID": "a001",
"Name": "Apple",
"Cost": 12
}