Keyboard

↓ ↑
move between the rows you can see
→
open a feature, then step into it
←
close a feature, or step out to the one above
Enter
go to the page in focus
Tab
the same rows, plus everything else on the page
/
search the whole report
m
open or close the navigation drawer
Esc
leave the search box, or close the drawer
?
this list

Captures a value with its quotes discarded or kept

All 36 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.

The parser trims an unquoted value. It keeps the whitespace of a quoted value. Either quote style protects a pipe, a bracket, and a brace. A blank cell captures null. The Captured Type column is then blank, because the parser captures no value.

The two expectation columns show the same input in the two modes of the parser. A test method reads the value with the quotes discarded. A tool that rewrites a table reads the value with the quotes kept, and the table keeps the quoting the author wrote. Two columns with the same value mean the value has no delimiting quotes.

The parser converts no number. The values 1 and 3.14 capture as text. The parameter type decides a conversion, and the parser does not read the parameter type.

expected outcome broken scenario
ScenarioInputDiscarding quotes?Keeping quotes?Captured Type?
Unquotedabcabcabcjava.lang.String
Single quoted'abc'abc'abc'java.lang.String
Double quoted"abc"abc"abc"java.lang.String
With spacesabc defabc defabc defjava.lang.String
Unquoted is trimmed a b c a b ca b cjava.lang.String
Single quoted is not trimmed' a b c ' a b c ' a b c 'java.lang.String
Double quoted is not trimmed" a b c " 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
Unterminated quote is literal'abc'abc'abcjava.lang.String
Quotes inside unquoted valuea'b"ca'b"ca'b"cjava.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
Integer111java.lang.String
Decimal3.143.143.14java.lang.String
Number with underscores1_000_0001_000_0001_000_000java.lang.String
List with unquoted string[a]
  • a
  • a
java.util.List
List with double quoted string["a"]
  • a
  • "a"
java.util.List
List with single quoted string['a']
  • a
  • 'a'
java.util.List
Set with unquoted string{a}
  • a
  • a
java.util.Set
Set with double quoted string{"a"}
  • a
  • "a"
java.util.Set
Set with single quoted string{'a'}
  • a
  • 'a'
java.util.Set
Map with unquoted string[a: a]
a
a
a
a
java.util.Map
Map with double quoted string[a: "a"]
a
a
a
"a"
java.util.Map
Map with single quoted string[a: 'a']
a
a
a
'a'
java.util.Map
Nested with double quoted strings[double: ["a"]]
double
  • a
double
  • "a"
java.util.Map
Nested with single quoted strings[single: ['a']]
single
  • a
single
  • 'a'
java.util.Map
Map with double quoted key["k": v]
k
v
"k"
v
java.util.Map
Map with single quoted key['k': v]
k
v
'k'
v
java.util.Map