Skip to content

Commit cd34bb4

Browse files
committed
Add description about optional marker to README
1 parent 56f350d commit cd34bb4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,10 @@ There are several markers as followings:
111111
| `#regex STR` | Expects actual (string) value to match the regular-expression 'STR' (see examples below) |
112112
| `#[NUM] EXPR` | Advanced array marker. When NUM is provided, array must has length just NUM. When EXPR is provided, array's element must match the pattern 'EXPR' (see examples below) |
113113

114+
### Optional marker
115+
116+
You can use double hash `##` to mark a field as optional. For example, `##string` means that the field can be a string, null or not present.
117+
114118
### Examples
115119

116120
| Pattern | `{}` | `{ "a": null }` | `{ "a": "abc" }` |

0 commit comments

Comments
 (0)