fix readme

This commit is contained in:
孙传宝 2020-05-10 19:27:32 +08:00
parent e55d3ba649
commit b0a15be10c
2 changed files with 2 additions and 0 deletions

View File

@ -92,6 +92,7 @@ https://github.com/DaveGamble/cJSON.git
- 字符串必须定义为char*类型。 - 字符串必须定义为char*类型。
- 数组必须定义为指针类型。 - 数组必须定义为指针类型。
- 如果结构体包含数组,需要为每一个数组定义一个额外的属性,用于保存数组大小。 - 如果结构体包含数组,需要为每一个数组定义一个额外的属性,用于保存数组大小。
- 结构体属性名必须与Json字段名一致。
``` c ``` c
typedef struct { typedef struct {

View File

@ -94,6 +94,7 @@ Even if you don't use cson, you usually need to do like this.
- String must be declared as char*. - String must be declared as char*.
- Array must be declared as pointer. - Array must be declared as pointer.
- Declare additional properties to hold the array size for every array property. - Declare additional properties to hold the array size for every array property.
- The structure property name must be the same as the JSON field name.
``` c ``` c
typedef struct { typedef struct {