Patrik Svensson 54be64ec84
Add JSON text renderer (#1086)
* Add JsonText widget to render highlighted JSON

Closes #1051
2022-12-31 18:17:15 +00:00

71 lines
3.7 KiB
Plaintext

┌─Some JSON───────────────────────────────────┐
│ { │
│ "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" │
│ } │
│ ] │
│ } │
└─────────────────────────────────────────────┘