https://github.com/bahrus/json-in-html
VSCode extension that supports JSON inside script tags and HTML attributes.
https://github.com/bahrus/json-in-html
Last synced: about 2 months ago
JSON representation
VSCode extension that supports JSON inside script tags and HTML attributes.
- Host: GitHub
- URL: https://github.com/bahrus/json-in-html
- Owner: bahrus
- License: other
- Created: 2021-09-18T22:14:08.000Z (over 3 years ago)
- Default Branch: baseline
- Last Pushed: 2021-10-10T21:45:14.000Z (over 3 years ago)
- Last Synced: 2025-03-09T14:46:43.134Z (3 months ago)
- Language: HTML
- Size: 60.5 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://marketplace.visualstudio.com/items?itemName=andersonbruceb.json-in-html)
# JSON-in-HTML Syntax Support
This VSCode extension provides syntax highlighting support for JSON inside HTML.
First, it extends [this great extension](https://github.com/panoply/vscode-json-script-tag), and supports two additional script types:
`` tags using
1. `type=application/json` or
2. `type=application/ld+json` or
3. `type=json` or
4. `type=importmap` attributes.will provide JSON editing capabilities inside the script tags.
In addition, json-in-html supports editing json within html tag attributes.
This is helpful for web components, which often make heavy use of JSON-serialized attributes.
## Examples
```html
/* JSON HERE */
/* JSON HERE */
/* JSON HERE */
/* JSON HERE */
/* JSON HERE */
/* JSON HERE */
/* JSON HERE */
/* JSON HERE */
/* JSON HERE */
/* JSON HERE */
/* JSON HERE */
/* JSON HERE */
```