YAML Test Schema | Schemas | Test Data

For each of the four schemas, the first column shows to which type the input YAML should resolve. The second column shows how the output YAML should look like.

YAML 1.2YAML 1.1
Input YAMLFailsafe JSON Core YAML 1.1
TypeOutputTypeOutputTypeOutputTypeOutput
nullstr
null
null
null
null
null
null
null
#emptystr
''
str
''
null
null
null
null
NULLstr
NULL
str
NULL
null
null
null
null
Nullstr
Null
str
Null
null
null
null
null
~str
~
str
~
null
null
null
null
falsestr
false
bool
false
bool
false
bool
false
truestr
true
bool
true
bool
true
bool
true
FALSEstr
FALSE
str
FALSE
bool
false
bool
false
Falsestr
False
str
False
bool
false
bool
false
TRUEstr
TRUE
str
TRUE
bool
true
bool
true
Truestr
True
str
True
bool
true
bool
true
Nstr
N
str
N
str
N
bool
false
nstr
n
str
n
str
n
bool
false
NOstr
NO
str
NO
str
NO
bool
false
Nostr
No
str
No
str
No
bool
false
nostr
no
str
no
str
no
bool
false
OFFstr
OFF
str
OFF
str
OFF
bool
false
Offstr
Off
str
Off
str
Off
bool
false
offstr
off
str
off
str
off
bool
false
ONstr
ON
str
ON
str
ON
bool
true
Onstr
On
str
On
str
On
bool
true
onstr
on
str
on
str
on
bool
true
Ystr
Y
str
Y
str
Y
bool
true
ystr
y
str
y
str
y
bool
true
YESstr
YES
str
YES
str
YES
bool
true
Yesstr
Yes
str
Yes
str
Yes
bool
true
yesstr
yes
str
yes
str
yes
bool
true
-3.14str
-3.14
float
-3.14
float
-3.14
float
-3.14
0.0str
0.0
float
0.0
float
0.0
float
0.0
3.str
3.
float
3.0
float
3.0
float
3.0
Input YAMLFailsafe JSON Core YAML 1.1
3.14str
3.14
float
3.14
float
3.14
float
3.14
3.140str
3.140
float
3.14
float
3.14
float
3.14
3.3e+3str
3.3e+3
float
3300.0
float
3300.0
float
3300.0
+0.3e+3str
+0.3e+3
str
+0.3e+3
float
300.0
float
300.0
+3.14str
+3.14
str
+3.14
float
3.14
float
3.14
.0str
.0
str
.0
float
0.0
float
0.0
.14str
.14
str
.14
float
0.14
float
0.14
.3e+3str
.3e+3
str
.3e+3
float
300.0
float
300.0
.3E-1str
.3E-1
str
.3E-1
float
0.03
float
0.03
001.23str
001.23
str
001.23
float
1.23
float
1.23
03.14str
03.14
str
03.14
float
3.14
float
3.14
.1_4str
.1_4
str
.1_4
str
.1_4
float
0.14
190:20:30.15str
190:20:30.15
str
190:20:30.15
str
190:20:30.15
float
685230.15
85.230_15e+03str
85.230_15e+03
str
85.230_15e+03
str
85.230_15e+03
float
85230.15
85_230.15str
85_230.15
str
85_230.15
str
85_230.15
float
85230.15
+.INFstr
+.INF
str
+.INF
inf
.inf
inf
.inf
+.Infstr
+.Inf
str
+.Inf
inf
.inf
inf
.inf
+.infstr
+.inf
str
+.inf
inf
.inf
inf
.inf
-.INFstr
-.INF
str
-.INF
inf
-.inf
inf
-.inf
-.Infstr
-.Inf
str
-.Inf
inf
-.inf
inf
-.inf
-.infstr
-.inf
str
-.inf
inf
-.inf
inf
-.inf
.INFstr
.INF
str
.INF
inf
.inf
inf
.inf
.Infstr
.Inf
str
.Inf
inf
.inf
inf
.inf
.infstr
.inf
str
.inf
inf
.inf
inf
.inf
.NANstr
.NAN
str
.NAN
nan
.nan
nan
.nan
.NaNstr
.NaN
str
.NaN
nan
.nan
nan
.nan
.nanstr
.nan
str
.nan
nan
.nan
nan
.nan
-0str
-0
int
0
int
0
int
0
-23str
-23
int
-23
int
-23
int
-23
0str
0
int
0
int
0
int
0
Input YAMLFailsafe JSON Core YAML 1.1
23str
23
int
23
int
23
int
23
+0str
+0
str
+0
int
0
int
0
+23str
+23
str
+23
int
23
int
23
00str
00
str
00
int
0
int
0
0011str
0011
str
0011
int
11
int
9
010str
010
str
010
int
10
int
8
07str
07
str
07
int
7
int
7
0x0str
0x0
str
0x0
int
0
int
0
0x10str
0x10
str
0x10
int
16
int
16
0x42str
0x42
str
0x42
int
66
int
66
0xastr
0xa
str
0xa
int
10
int
10
+0100_200str
+0100_200
str
+0100_200
str
+0100_200
int
32896
+0b100str
+0b100
str
+0b100
str
+0b100
int
4
+190:20:30str
+190:20:30
str
+190:20:30
str
+190:20:30
int
685230
-0100_200str
-0100_200
str
-0100_200
str
-0100_200
int
-32896
-0b101str
-0b101
str
-0b101
str
-0b101
int
-5
-0x30str
-0x30
str
-0x30
str
-0x30
int
-48
-190:20:30str
-190:20:30
str
-190:20:30
str
-190:20:30
int
-685230
02_0str
02_0
str
02_0
str
02_0
int
16
0b0str
0b0
str
0b0
str
0b0
int
0
0b100_101str
0b100_101
str
0b100_101
str
0b100_101
int
37
0x2_0str
0x2_0
str
0x2_0
str
0x2_0
int
32
100_000str
100_000
str
100_000
str
100_000
int
100000
190:20:30str
190:20:30
str
190:20:30
str
190:20:30
int
685230
0.3e3str
0.3e3
float
300.0
float
300.0
str
0.3e3
3e3str
3e3
float
3000.0
float
3000.0
str
3e3
+0.3e3str
+0.3e3
str
+0.3e3
float
300.0
str
+0.3e3
.3e3str
.3e3
str
.3e3
float
300.0
str
.3e3
08str
08
str
08
int
8
str
08
0o0str
0o0
str
0o0
int
0
str
0o0
Input YAMLFailsafe JSON Core YAML 1.1
0o10str
0o10
str
0o10
int
8
str
0o10
0o7str
0o7
str
0o7
int
7
str
0o7
.str
.
str
.
str
.
str
.
._str
._
str
._
str
._
str
._
._14str
._14
str
._14
str
._14
str
._14
.inFstr
.inF
str
.inF
str
.inF
str
.inF
_._str
_._
str
_._
str
_._
str
_._
fAlsestr
fAlse
str
fAlse
str
fAlse
str
fAlse
infstr
inf
str
inf
str
inf
str
inf
nOstr
nO
str
nO
str
nO
str
nO
nuLLstr
nuLL
str
nuLL
str
nuLL
str
nuLL
TrUEstr
TrUE
str
TrUE
str
TrUE
str
TrUE
!!null nullerror
null
null
null
null
null
null
!!null #emptyerror
error
null
null
null
null
!!null NULLerror
error
null
null
null
null
!!null Nullerror
error
null
null
null
null
!!null ~error
error
null
null
null
null
!!bool falseerror
bool
false
bool
false
bool
false
!!bool trueerror
bool
true
bool
true
bool
true
!!bool FALSEerror
error
bool
false
bool
false
!!bool Falseerror
error
bool
false
bool
false
!!bool TRUEerror
error
bool
true
bool
true
!!bool Trueerror
error
bool
true
bool
true
!!bool Nerror
error
error
bool
false
!!bool nerror
error
error
bool
false
!!bool NOerror
error
error
bool
false
!!bool Noerror
error
error
bool
false
!!bool noerror
error
error
bool
false
!!bool OFFerror
error
error
bool
false
!!bool Offerror
error
error
bool
false
Input YAMLFailsafe JSON Core YAML 1.1
!!bool offerror
error
error
bool
false
!!bool ONerror
error
error
bool
true
!!bool Onerror
error
error
bool
true
!!bool onerror
error
error
bool
true
!!bool Yerror
error
error
bool
true
!!bool yerror
error
error
bool
true
!!bool YESerror
error
error
bool
true
!!bool Yeserror
error
error
bool
true
!!bool yeserror
error
error
bool
true
!!float -3.14error
float
-3.14
float
-3.14
float
-3.14
!!float 0.0error
float
0.0
float
0.0
float
0.0
!!float 3.error
float
3.0
float
3.0
float
3.0
!!float 3.14error
float
3.14
float
3.14
float
3.14
!!float +0.3e+3error
error
float
300.0
float
300.0
!!float .0error
error
float
0.0
float
0.0
!!float .14error
error
float
0.14
float
0.14
!!float .3e+3error
error
float
300.0
float
300.0
!!float .3E-1error
error
float
0.03
float
0.03
!!float 001.23error
error
float
1.23
float
1.23
!!float 3.3e+3error
error
float
3300.0
float
3300.0
!!float .1_4error
error
error
float
0.14
!!float 190:20:30.15error
error
error
float
685230.15
!!float 85.230_15e+03error
error
error
float
85230.15
!!float 85_230.15error
error
error
float
85230.15
!!float +.INFerror
error
inf
.inf
inf
.inf
!!float +.Inferror
error
inf
.inf
inf
.inf
!!float +.inferror
error
inf
.inf
inf
.inf
!!float -.INFerror
error
inf
-.inf
inf
-.inf
!!float -.Inferror
error
inf
-.inf
inf
-.inf
!!float -.inferror
error
inf
-.inf
inf
-.inf
Input YAMLFailsafe JSON Core YAML 1.1
!!float .INFerror
error
inf
.inf
inf
.inf
!!float .Inferror
error
inf
.inf
inf
.inf
!!float .inferror
error
inf
.inf
inf
.inf
!!float .NANerror
error
nan
.nan
nan
.nan
!!float .NaNerror
error
nan
.nan
nan
.nan
!!float .nanerror
error
nan
.nan
nan
.nan
!!int -0error
int
0
int
0
int
0
!!int -23error
int
-23
int
-23
int
-23
!!int 0error
int
0
int
0
int
0
!!int 23error
int
23
int
23
int
23
!!int +0error
error
int
0
int
0
!!int +23error
error
int
23
int
23
!!int 0011error
error
int
11
int
9
!!int 07error
error
int
7
int
7
!!int 0x0error
error
int
0
int
0
!!int 0x10error
error
int
16
int
16
!!int 0x42error
error
int
66
int
66
!!int 0xaerror
error
int
10
int
10
!!int +0100_200error
error
error
int
32896
!!int +0b100error
error
error
int
4
!!int +190:20:30error
error
error
int
685230
!!int -0100_200error
error
error
int
-32896
!!int -0b101error
error
error
int
-5
!!int -0x30error
error
error
int
-48
!!int -190:20:30error
error
error
int
-685230
!!int 00error
error
error
int
0
!!int 010error
error
error
int
8
!!int 02_0error
error
error
int
16
!!int 0b0error
error
error
int
0
!!int 0b100_101error
error
error
int
37
Input YAMLFailsafe JSON Core YAML 1.1
!!int 0x2_0error
error
error
int
32
!!int 100_000error
error
error
int
100000
!!int 190:20:30error
error
error
int
685230
!!str #emptystr
''
str
''
str
''
str
''
!!str +.INFstr
+.INF
str
+.INF
str
'+.INF'
str
'+.INF'
!!str +.Infstr
+.Inf
str
+.Inf
str
'+.Inf'
str
'+.Inf'
!!str +.infstr
+.inf
str
+.inf
str
'+.inf'
str
'+.inf'
!!str +0str
+0
str
+0
str
'+0'
str
'+0'
!!str +0.3e+3str
+0.3e+3
str
+0.3e+3
str
'+0.3e+3'
str
'+0.3e+3'
!!str +0.3e3str
+0.3e3
str
+0.3e3
str
'+0.3e3'
str
+0.3e3
!!str +0100_200str
+0100_200
str
+0100_200
str
+0100_200
str
'+0100_200'
!!str +0b100str
+0b100
str
+0b100
str
+0b100
str
'+0b100'
!!str +190:20:30str
+190:20:30
str
+190:20:30
str
+190:20:30
str
'+190:20:30'
!!str +23str
+23
str
+23
str
'+23'
str
'+23'
!!str -.INFstr
-.INF
str
-.INF
str
'-.INF'
str
'-.INF'
!!str -.Infstr
-.Inf
str
-.Inf
str
'-.Inf'
str
'-.Inf'
!!str -.infstr
-.inf
str
-.inf
str
'-.inf'
str
'-.inf'
!!str -0str
-0
str
'-0'
str
'-0'
str
'-0'
!!str -0100_200str
-0100_200
str
-0100_200
str
-0100_200
str
'-0100_200'
!!str -0b101str
-0b101
str
-0b101
str
-0b101
str
'-0b101'
!!str -0x30str
-0x30
str
-0x30
str
-0x30
str
'-0x30'
!!str -190:20:30str
-190:20:30
str
-190:20:30
str
-190:20:30
str
'-190:20:30'
!!str -23str
-23
str
'-23'
str
'-23'
str
'-23'
!!str -3.14str
-3.14
str
'-3.14'
str
'-3.14'
str
'-3.14'
!!str .str
.
str
.
str
.
str
.
!!str .0str
.0
str
.0
str
'.0'
str
'.0'
!!str .14str
.14
str
.14
str
'.14'
str
'.14'
!!str .1_4str
.1_4
str
.1_4
str
.1_4
str
'.1_4'
!!str .3e+3str
.3e+3
str
.3e+3
str
'.3e+3'
str
'.3e+3'
!!str .3E-1str
.3E-1
str
.3E-1
str
'.3E-1'
str
'.3E-1'
Input YAMLFailsafe JSON Core YAML 1.1
!!str .3e3str
.3e3
str
.3e3
str
'.3e3'
str
.3e3
!!str ._str
._
str
._
str
._
str
._
!!str ._14str
._14
str
._14
str
._14
str
._14
!!str .INFstr
.INF
str
.INF
str
'.INF'
str
'.INF'
!!str .Infstr
.Inf
str
.Inf
str
'.Inf'
str
'.Inf'
!!str .infstr
.inf
str
.inf
str
'.inf'
str
'.inf'
!!str .NANstr
.NAN
str
.NAN
str
'.NAN'
str
'.NAN'
!!str .NaNstr
.NaN
str
.NaN
str
'.NaN'
str
'.NaN'
!!str .nanstr
.nan
str
.nan
str
'.nan'
str
'.nan'
!!str 0str
0
str
'0'
str
'0'
str
'0'
!!str 0.0str
0.0
str
'0.0'
str
'0.0'
str
'0.0'
!!str 0.3e3str
0.3e3
str
'0.3e3'
str
'0.3e3'
str
0.3e3
!!str 00str
00
str
00
str
'00'
str
'00'
!!str 001.23str
001.23
str
001.23
str
'001.23'
str
'001.23'
!!str 0011str
0011
str
0011
str
'0011'
str
'0011'
!!str 010str
010
str
010
str
'010'
str
'010'
!!str 02_0str
02_0
str
02_0
str
02_0
str
'02_0'
!!str 07str
07
str
07
str
'07'
str
'07'
!!str 0b0str
0b0
str
0b0
str
0b0
str
'0b0'
!!str 0b100_101str
0b100_101
str
0b100_101
str
0b100_101
str
'0b100_101'
!!str 0o0str
0o0
str
0o0
str
'0o0'
str
0o0
!!str 0o10str
0o10
str
0o10
str
'0o10'
str
0o10
!!str 0o7str
0o7
str
0o7
str
'0o7'
str
0o7
!!str 0x0str
0x0
str
0x0
str
'0x0'
str
'0x0'
!!str 0x2_0str
0x2_0
str
0x2_0
str
0x2_0
str
'0x2_0'
!!str 0xastr
0xa
str
0xa
str
'0xa'
str
'0xa'
!!str 100_000str
100_000
str
100_000
str
100_000
str
'100_000'
!!str 190:20:30str
190:20:30
str
190:20:30
str
190:20:30
str
'190:20:30'
!!str 190:20:30.15str
190:20:30.15
str
190:20:30.15
str
190:20:30.15
str
'190:20:30.15'
!!str 23str
23
str
'23'
str
'23'
str
'23'
Input YAMLFailsafe JSON Core YAML 1.1
!!str 3.str
'3.'
str
'3.'
str
'3.'
str
'3.'
!!str 3.14str
3.14
str
'3.14'
str
'3.14'
str
'3.14'
!!str 3.3e+3str
3.3e+3
str
'3.3e+3'
str
'3.3e+3'
str
'3.3e+3'
!!str 85.230_15e+03str
85.230_15e+03
str
85.230_15e+03
str
85.230_15e+03
str
'85.230_15e+03'
!!str 85_230.15str
85_230.15
str
85_230.15
str
85_230.15
str
'85_230.15'
!!str _._str
_._
str
_._
str
_._
str
_._
!!str FALSEstr
FALSE
str
FALSE
str
'FALSE'
str
'FALSE'
!!str Falsestr
False
str
False
str
'False'
str
'False'
!!str falsestr
false
str
'false'
str
'false'
str
'false'
!!str Nstr
N
str
N
str
N
str
'N'
!!str nstr
n
str
n
str
n
str
'n'
!!str NOstr
NO
str
NO
str
NO
str
'NO'
!!str Nostr
No
str
No
str
No
str
'No'
!!str nostr
no
str
no
str
no
str
'no'
!!str NULLstr
NULL
str
NULL
str
'NULL'
str
'NULL'
!!str Nullstr
Null
str
Null
str
'Null'
str
'Null'
!!str nullstr
null
str
'null'
str
'null'
str
'null'
!!str OFFstr
OFF
str
OFF
str
OFF
str
'OFF'
!!str Offstr
Off
str
Off
str
Off
str
'Off'
!!str offstr
off
str
off
str
off
str
'off'
!!str ONstr
ON
str
ON
str
ON
str
'ON'
!!str Onstr
On
str
On
str
On
str
'On'
!!str onstr
on
str
on
str
on
str
'on'
!!str TRUEstr
TRUE
str
TRUE
str
'TRUE'
str
'TRUE'
!!str Truestr
True
str
True
str
'True'
str
'True'
!!str truestr
true
str
'true'
str
'true'
str
'true'
!!str Ystr
Y
str
Y
str
Y
str
'Y'
!!str ystr
y
str
y
str
y
str
'y'
!!str YESstr
YES
str
YES
str
YES
str
'YES'
!!str Yesstr
Yes
str
Yes
str
Yes
str
'Yes'
Input YAMLFailsafe JSON Core YAML 1.1
!!str yesstr
yes
str
yes
str
yes
str
'yes'
!!str ~str
~
str
~
str
'~'
str
'~'
!!float 0.3e3error
float
300.0
float
300.0
error
!!float +0.3e3error
error
float
300.0
error
!!float .3e3error
error
float
300.0
error
!!int 0o0error
error
int
0
error
!!int 0o10error
error
int
8
error
!!int 0o7error
error
int
7
error
!!bool FaLSEerror
error
error
error
!!bool nOerror
error
error
error
!!bool TrUEerror
error
error
error
!!bool yEserror
error
error
error
!!float .inFerror
error
error
error
!!float .nAnerror
error
error
error
!!float inferror
error
error
error
!!float nanerror
error
error
error
!!null NuLLerror
error
error
error