In quote-preserving mode values capture with their quotes intact
All 34 scenarios hold
The mode used by tools that rewrite tables, such as the formatter, so the original quoting survives a round trip.
expected outcome
broken scenario
| Scenario | Input | Captured? | Captured Type? |
|---|---|---|---|
| Unquoted | abc | abc | java.lang.String |
| Single quoted | 'abc' | 'abc' | java.lang.String |
| Double quoted | "abc" | "abc" | java.lang.String |
| With spaces | abc def | abc def | java.lang.String |
| Unquoted is trimmed | a b c | a b c | java.lang.String |
| Single quoted is not trimmed | ' a b c ' | ' a b c ' | java.lang.String |
| Double quoted is not trimmed | " a b c " | " a b c " | java.lang.String |
| Blank is null | |||
| Empty single quoted | '' | '' | java.lang.String |
| Empty double quoted | "" | "" | java.lang.String |
| Unmatched single quote | ' | ' | java.lang.String |
| Unmatched double quote | " | " | java.lang.String |
| Single quoted pipe | '|' | '|' | java.lang.String |
| Double quoted pipe | "|" | "|" | java.lang.String |
| Single quoted opening bracket | '[' | '[' | java.lang.String |
| Double quoted opening bracket | "[" | "[" | java.lang.String |
| Single quoted opening brace | '{' | '{' | java.lang.String |
| Double quoted opening brace | "{" | "{" | java.lang.String |
| Integer | 1 | 1 | java.lang.String |
| Decimal | 3.14 | 3.14 | java.lang.String |
| Number with underscores | 1_000_000 | 1_000_000 | java.lang.String |
| List with unquoted string | [a] |
| java.util.List |
| List with double quoted string | ["a"] |
| java.util.List |
| List with single quoted string | ['a'] |
| java.util.List |
| Set with unquoted string | {a} |
| java.util.Set |
| Set with double quoted string | {"a"} |
| java.util.Set |
| Set with single quoted string | {'a'} |
| java.util.Set |
| Map with unquoted string | [a: a] |
| java.util.Map |
| Map with double quoted string | [a: "a"] |
| java.util.Map |
| Map with single quoted string | [a: 'a'] |
| java.util.Map |
| Nested with double quoted strings | [double: ["a"]] |
| java.util.Map |
| Nested with single quoted strings | [single: ['a']] |
| java.util.Map |
| Map with double quoted key | ["k": v] |
| java.util.Map |
| Map with single quoted key | ['k': v] |
| java.util.Map |