From ccf0b006c940c4468ba9851ddc591b59cd508dc7 Mon Sep 17 00:00:00 2001 From: gagdiez Date: Tue, 21 Nov 2023 04:25:14 +0100 Subject: [PATCH] Fixed explanation of enums in README.md (#68) Co-authored-by: Bo Yao --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d528832a..973c230a 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ More complex objects are described by a JSON object. The following types are sup - `{ option: Schema }` - an optional object. The type of the object is described by the `type` field. - `{ map: { key: Schema, value: Schema }}` - a map. The type of the keys and values are described by the `key` and `value` fields respectively. - `{ set: Schema }` - a set. The type of the elements is described by the `type` field. -- `{ enum: [{ struct: {...} }, { struct: {...} }, ... ] }` - an enum. The variants of the enum are described by the `className1`, `className2`, etc. fields. The variants are structs. +- `{ enum: [ { struct: { className1: structSchema1 } }, { struct: { className2: structSchema2 } }, ... ] }` - an enum. The variants of the enum are described by the `className1`, `className2`, etc. fields. The variants are structs. - `{ struct: { field1: Schema1, field2: Schema2, ... } }` - a struct. The fields of the struct are described by the `field1`, `field2`, etc. fields. ### Type Mappings