Add JSON text renderer (#1086)

* Add JsonText widget to render highlighted JSON

Closes #1051
This commit is contained in:
Patrik Svensson
2022-12-31 19:17:15 +01:00
committed by GitHub
parent 3e6e0990c5
commit 54be64ec84
48 changed files with 1634 additions and 21 deletions

View File

@@ -0,0 +1,70 @@
┌─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" │
│ } │
│ ] │
│ } │
└─────────────────────────────────────────────┘