Skip to content

[html] JSON edit support inside HTML document / script tag with type="application/json" #36280

@bahrus

Description

@bahrus

There are scenarios where it is useful to embed JSON inside an html document, such as for the amp-bind element:

<amp-state id="myAnimals">
  <script type="application/json">
    {
      "dog": {
        "imageUrl": "/img/dog.jpg",
        "style": "greenBackground"
      },
      "cat": {
        "imageUrl": "/img/cat.jpg",
        "style": "redBackground"
      }
    }
  </script>
</amp-state>

Providing syntax coloring / error checking would be very beneficial in these cases.

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionalityhtmlHTML support issues

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions