An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

        

[![Install](https://img.shields.io/badge/vscode-install-blue.svg)](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 */


```