# json2code **Repository Path**: jayuc/json2code ## Basic Information - **Project Name**: json2code - **Description**: json字符串和代码相互转换 - **Primary Language**: Java - **License**: MulanPubL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-08-05 - **Last Updated**: 2024-08-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # json2code #### 介绍 json字符串和代码相互转换,可以生成文件 > 例如:json 转 xml 字符串、json 转 html 字符串、json 转 .vue 字符串 ###### json格式: ``` { tagName: 'div', children: [ {tagName: 'span', value: '你好'} ], tagType: '1', properties: [ {name: 'height', value: '50', type: 'string'} ] } ``` ###### 转换后: ```
你好
``` ###### tagType说明: > 1: 普通元素节点 2:vue元素节点 3:文本节点 4: xml头节点 99:空行