mirror of
https://github.com/spectreconsole/spectre.console.git
synced 2025-12-26 15:57:58 +01:00
Add JSON text renderer (#1086)
* Add JsonText widget to render highlighted JSON Closes #1051
This commit is contained in:
68
test/Spectre.Console.Tests/Data/example.json
Normal file
68
test/Spectre.Console.Tests/Data/example.json
Normal file
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"id": "0001",
|
||||
"type": "donut",
|
||||
"name": "Cake",
|
||||
"ppu": 0.55,
|
||||
"foo": true,
|
||||
"bar": false,
|
||||
"qux": 32,
|
||||
"corgi": null,
|
||||
"batters": {
|
||||
"batter": [
|
||||
{
|
||||
"id": "1001",
|
||||
"type": "Regular",
|
||||
"min": 0
|
||||
},
|
||||
{
|
||||
"id": "1002",
|
||||
"type": "Chocolate",
|
||||
"min": 0.32
|
||||
},
|
||||
{
|
||||
"id": "1003",
|
||||
"min": 12.32,
|
||||
"type": "Blueberry"
|
||||
},
|
||||
{
|
||||
"id": "1004",
|
||||
"min": 0.32E-12,
|
||||
"type": "Devil's Food"
|
||||
}
|
||||
]
|
||||
},
|
||||
"topping": [
|
||||
{
|
||||
"id": "5001",
|
||||
"min": 0.32e-12,
|
||||
"type": "None"
|
||||
},
|
||||
{
|
||||
"id": "5002",
|
||||
"min": 0.32E+12,
|
||||
"type": "Glazed"
|
||||
},
|
||||
{
|
||||
"id": "5005",
|
||||
"min": 0.32e+12,
|
||||
"type": "Sugar"
|
||||
},
|
||||
{
|
||||
"id": "5007",
|
||||
"min": 0.32e12,
|
||||
"type": "Powdered Sugar"
|
||||
},
|
||||
{
|
||||
"id": "5006",
|
||||
"type": "Chocolate with Sprinkles"
|
||||
},
|
||||
{
|
||||
"id": "5003",
|
||||
"type": "Chocolate"
|
||||
},
|
||||
{
|
||||
"id": "5004",
|
||||
"type": "Maple"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user