Is there a standard for embedding JSON in HTML?

前端 未结 4 1038
借酒劲吻你
借酒劲吻你 2021-01-31 19:37

I would like to embed JSON in HTML. The most elegant solution I have found makes use of the script-tag and the mime media type application/json.

<
4条回答
  •  时光说笑
    2021-01-31 20:23

    Reasons for using inline JSON (instead of a JSON-P service)

    You can inline JSON-P as well. OK, you just call that method "inline script", but it has the advantages of both :-)

提交回复
热议问题