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
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
3.14str
3.14
float
3.14
float
3.14
float
3.14
Input YAMLFailsafe JSON Core YAML 1.1
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
.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
23str
23
int
23
int
23
int
23
+0str
+0
str
+0
int
0
int
0
+23str
+23
str
+23
int
23
int
23
Input YAMLFailsafe JSON Core YAML 1.1
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
0o10str
0o10
str
0o10
int
8
str
0o10
0o7str
0o7
str
0o7
int
7
str
0o7
.str
.
str
.
str
.
str
.
Input YAMLFailsafe JSON Core YAML 1.1
._str
._
str
._
str
._
str
._
._14str
._14
str
._14
str
._14
str
._14
_._str
_._
str
_._
str
_._
str
_._
!!null nulltodo
null
null
null
null
null
null
!!null #emptytodo
todo
null
null
null
null
!!null NULLtodo
todo
null
null
null
null
!!null Nulltodo
todo
null
null
null
null
!!null ~todo
todo
null
null
null
null
!!bool falsetodo
bool
false
bool
false
bool
false
!!bool truetodo
bool
true
bool
true
bool
true
!!bool FALSEtodo
todo
bool
false
bool
false
!!bool Falsetodo
todo
bool
false
bool
false
!!bool TRUEtodo
todo
bool
true
bool
true
!!bool Truetodo
todo
bool
true
bool
true
!!bool Ntodo
todo
todo
bool
false
!!bool ntodo
todo
todo
bool
false
!!bool NOtodo
todo
todo
bool
false
!!bool Notodo
todo
todo
bool
false
!!bool notodo
todo
todo
bool
false
!!bool OFFtodo
todo
todo
bool
false
!!bool Offtodo
todo
todo
bool
false
!!bool offtodo
todo
todo
bool
false
!!bool ONtodo
todo
todo
bool
true
!!bool Ontodo
todo
todo
bool
true
!!bool ontodo
todo
todo
bool
true
!!bool Ytodo
todo
todo
bool
true
!!bool ytodo
todo
todo
bool
true
!!bool YEStodo
todo
todo
bool
true
!!bool Yestodo
todo
todo
bool
true
!!bool yestodo
todo
todo
bool
true
Input YAMLFailsafe JSON Core YAML 1.1
!!float -3.14todo
float
-3.14
float
-3.14
float
-3.14
!!float 0.0todo
float
0.0
float
0.0
float
0.0
!!float 3.todo
float
3.0
float
3.0
float
3.0
!!float 3.14todo
float
3.14
float
3.14
float
3.14
!!float +0.3e+3todo
todo
float
300.0
float
300.0
!!float .0todo
todo
float
0.0
float
0.0
!!float .14todo
todo
float
0.14
float
0.14
!!float .3e+3todo
todo
float
300.0
float
300.0
!!float .3E-1todo
todo
float
0.03
float
0.03
!!float 001.23todo
todo
float
1.23
float
1.23
!!float 3.3e+3todo
todo
float
3300.0
float
3300.0
!!float .1_4todo
todo
todo
float
0.14
!!float 190:20:30.15todo
todo
todo
float
685230.15
!!float 85.230_15e+03todo
todo
todo
float
85230.15
!!float 85_230.15todo
todo
todo
float
85230.15
!!float +.INFtodo
todo
inf
.inf
inf
.inf
!!float +.Inftodo
todo
inf
.inf
inf
.inf
!!float +.inftodo
todo
inf
.inf
inf
.inf
!!float -.INFtodo
todo
inf
-.inf
inf
-.inf
!!float -.Inftodo
todo
inf
-.inf
inf
-.inf
!!float -.inftodo
todo
inf
-.inf
inf
-.inf
!!float .INFtodo
todo
inf
.inf
inf
.inf
!!float .Inftodo
todo
inf
.inf
inf
.inf
!!float .inftodo
todo
inf
.inf
inf
.inf
!!float .NANtodo
todo
nan
.nan
nan
.nan
!!float .NaNtodo
todo
nan
.nan
nan
.nan
!!float .nantodo
todo
nan
.nan
nan
.nan
!!int -0todo
int
0
int
0
int
0
!!int -23todo
int
-23
int
-23
int
-23
!!int 0todo
int
0
int
0
int
0
Input YAMLFailsafe JSON Core YAML 1.1
!!int 23todo
int
23
int
23
int
23
!!int +0todo
todo
int
0
int
0
!!int +23todo
todo
int
23
int
23
!!int 0011todo
todo
int
11
int
9
!!int 07todo
todo
int
7
int
7
!!int 0x0todo
todo
int
0
int
0
!!int 0x10todo
todo
int
16
int
16
!!int 0x42todo
todo
int
66
int
66
!!int 0xatodo
todo
int
10
int
10
!!int +0100_200todo
todo
todo
int
32896
!!int +0b100todo
todo
todo
int
4
!!int +190:20:30todo
todo
todo
int
685230
!!int -0100_200todo
todo
todo
int
-32896
!!int -0b101todo
todo
todo
int
-5
!!int -0x30todo
todo
todo
int
-48
!!int -190:20:30todo
todo
todo
int
-685230
!!int 00todo
todo
todo
int
0
!!int 010todo
todo
todo
int
8
!!int 02_0todo
todo
todo
int
16
!!int 0b0todo
todo
todo
int
0
!!int 0b100_101todo
todo
todo
int
37
!!int 0x2_0todo
todo
todo
int
32
!!int 100_000todo
todo
todo
int
100000
!!int 190:20:30todo
todo
todo
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'
Input YAMLFailsafe JSON Core YAML 1.1
!!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'
!!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'
Input YAMLFailsafe JSON Core YAML 1.1
!!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'
!!str 3.todo
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'
Input YAMLFailsafe JSON Core YAML 1.1
!!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 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'
!!str yesstr
yes
str
yes
str
yes
str
'yes'
!!str ~str
~
str
~
str
'~'
str
'~'
!!float 0.3e3todo
float
300.0
float
300.0
todo
!!float +0.3e3todo
todo
float
300.0
todo
!!float .3e3todo
todo
float
300.0
todo
!!int 0o0todo
todo
int
0
todo
!!int 0o10todo
todo
int
8
todo
!!int 0o7todo
todo
int
7
todo