From 1bd11c863b4b522320f7ea154f35a2a412b0e91f Mon Sep 17 00:00:00 2001 From: Britton Hayes Date: Fri, 1 Oct 2021 00:42:24 -0700 Subject: [PATCH] fix: more detailed readme --- README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/README.md b/README.md index 44eca18..7913ee7 100644 --- a/README.md +++ b/README.md @@ -37,3 +37,34 @@ test: myValue: '1' myValue2: '2' ``` + +### More Complex Schema + +- Use `?` to indicate an optional field +- Specify the preferred type with values like "string" or "number" +- Replicate deeply nested structures in JSON to represent expected YAML + +```json +{ + "structure": { + "school": { + "description?": "string", + "code": "number", + "principal": { + "name": "string" + }, + "classRooms": [ + { + "name": "string", + "id": "number", + "location?": { + "floor": "string", + "building": "string" + } + } + ], + "teachers": ["string"] + } + } +} +```