svelte-jsoneditor 一个基于Web的工具,用于查看,编辑,格式化,转换和验证JSON 该库是用Svelte编写的,但是可以在任何框架(React,Angular,纯JavaScript)中使用。 安装 npm install 使用 有关一些完整的示例,请参见部分。 Card.svelte 创建带有双向绑定的JSONEditor bind:json : < script > import { JSONEditor } from 'svelte-jsoneditor' let json = { 'array' : [ 1 , 2 , 3 ] , 'boolean' : true , 'color' : '#82b92c' , 'null' : null , 'number' : 123 , 'object' : {