Tells a set from a value that merely starts with a brace
All 9 scenarios hold
These rules cover one cell value: strings, quoting, the three collection forms, and the errors a malformed value raises. The three collection forms are a list, a set, and a map.
This table holds two outcomes, as the table for a list does. A value that does not open a set captures as a plain string. A value that opens a set and does not complete it fails to parse.
expected outcome
broken scenario
| Scenario | Input | Parsed type? | Error message? |
|---|---|---|---|
| Quoted braces | "{}" | java.lang.String | |
| Missing opening brace | } | java.lang.String | |
| Unexpected leading character | a{} | java.lang.String | |
| Missing closing brace | { | Failed to parse `{` | |
| Closed by the wrong delimiter | {a, b] | Failed to parse `{a, b]` | |
| Double opening brace | {{} | Failed to parse `{{}` | |
| Double closing brace | {}} | Failed to parse `}` | |
| Unexpected trailing character | {}a | Failed to parse `a` | |
| Missing element | {a,} | Failed to parse `{a,}` |