Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>json-in-htmlNew to Visual Studio Code? Get it now.
json-in-html

json-in-html

andersonbruceb

|
3,391 installs
| (2) | Free
VSCode extension that supports JSON inside script tags and HTML attributes.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Install

JSON-in-HTML Syntax Support

This VSCode extension provides syntax highlighting support for JSON inside HTML.

First, it extends this great extension, and supports two additional script types:

<script></script> 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

<script type="application/json">
  /* JSON HERE */
</script>

<script type="application/ld+json">
  /* JSON HERE */
</script>

<script type="importmap">
    /* JSON HERE */
</script>

<script type="json">
    /* JSON HERE */
</script>

<script type='application/json'>
  /* JSON HERE */
</script>

<script type='application/ld+json'>
  /* JSON HERE */
</script>

<script type='importmap'>
    /* JSON HERE */
</script>

<script type=json>
    /* JSON HERE */
</script>

<script type=application/json>
  /* JSON HERE */
</script>

<script type=application/ld+json>
  /* JSON HERE */
</script>

<script type=importmap>
    /* JSON HERE */
</script>

<script type=json>
    /* JSON HERE */
</script>

<div attr='
  {"x": "hello"}
'></div>
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft