## JSON 浏览

将 JSON 数据格式化显示在界面。

### 基础用法

JSON 数据格式化显示

::: demo 组件 JsonView 使用示例

```vue
<template>
  <dg-json-view :json="result" style="text-align:left"></dg-json-view>
</template>

<style>
.text {
  font-size: 14px;
}
</style>
<script>
export default {
  name: 'App',
  data() {
    return {
      result: {
        engines: {
          node: '>= 6.0.0',
          npm: '>= 3.0.0',
        },
        browserslist: ['> 1%', 'last 2 versions', 'not ie <= 8'],
        main: '.eslintrc.js',
        directories: {
          doc: 'docs',
        },
        repository: {
          type: 'git',
          url: 'http://192.168.2.98/datago/datago-vue.git',
        },
        keywords: [],
        license: 'ISC',
      },
    }
  },
}
</script>
```

:::

### Attributes

| 参数 | 说明             | 类型   | 可选值 | 默认值 |
| ---- | ---------------- | ------ | ------ | ------ |
| json | 设置 JSON 数据体 | string | —      | —      |
