--- &test-SYW4
Title: Spec Example 2.2. Mapping Scalars to Scalars
Tags: [ comment, scalar, spec ]
hr: 65 # Home runs
avg: 0.278 # Batting average
rbi: 147 # Runs Batted In
+STR
+DOC
+MAP
=VAL :hr
=VAL :65
=VAL :avg
=VAL :0.278
=VAL :rbi
=VAL :147
-MAP
-DOC
-STR
{
"avg": 0.278,
"hr": 65,
"rbi": 147
}
json_diff
{
"avg": "0.278",
"hr": "65",
"rbi": "147"
}
json_diff
{
"avg": "0.278",
"hr": "65",
"rbi": "147"
}
na
Line Col Char Byte Token|Content
1 0 0 0 +DOC |
1 0 0 0 +NODE|
1 0 0 0 +MAP |
1 0 0 0 +PAIR|
1 0 0 0 +NODE|
1 0 0 0 +VAL |
1 0 0 0 =TEXT|hr
1 2 2 2 -VAL |
1 2 2 2 -NODE|
1 2 2 2 =SYNX|:
1 3 3 3 =WSPC|..
1 5 5 5 +NODE|
1 5 5 5 +VAL |
1 5 5 5 =TEXT|65
1 7 7 7 -VAL |
1 7 7 7 -NODE|
1 7 7 7 =WSPC|....
1 11 11 11 +COMM|
1 11 11 11 =SYNX|#
1 12 12 12 =META|.Home.runs
1 22 22 22 -COMM|
1 22 22 22 =EOL |\x0a
2 0 23 23 -PAIR|
2 0 23 23 +PAIR|
2 0 23 23 +NODE|
2 0 23 23 +VAL |
2 0 23 23 =TEXT|avg
2 3 26 26 -VAL |
2 3 26 26 -NODE|
2 3 26 26 =SYNX|:
2 4 27 27 =WSPC|.
2 5 28 28 +NODE|
2 5 28 28 +VAL |
2 5 28 28 =TEXT|0.278
2 10 33 33 -VAL |
2 10 33 33 -NODE|
2 10 33 33 =WSPC|.
2 11 34 34 +COMM|
2 11 34 34 =SYNX|#
2 12 35 35 =META|.Batting.average
2 28 51 51 -COMM|
2 28 51 51 =EOL |\x0a
3 0 52 52 -PAIR|
3 0 52 52 +PAIR|
3 0 52 52 +NODE|
3 0 52 52 +VAL |
3 0 52 52 =TEXT|rbi
3 3 55 55 -VAL |
3 3 55 55 -NODE|
3 3 55 55 =SYNX|:
3 4 56 56 =WSPC|.
3 5 57 57 +NODE|
3 5 57 57 +VAL |
3 5 57 57 =TEXT|147
3 8 60 60 -VAL |
3 8 60 60 -NODE|
3 8 60 60 =WSPC|...
3 11 63 63 +COMM|
3 11 63 63 =SYNX|#
3 12 64 64 =META|.Runs.Batted.In
3 27 79 79 -COMM|
3 27 79 79 =EOL |\x0a
4 0 80 80 -PAIR|
4 0 80 80 -MAP |
4 0 80 80 -NODE|
4 0 80 80 -DOC |
na
{
'avg' => '0.278',
'hr' => 65,
'rbi' => 147
}
na
{
'avg' => '0.278',
'hr' => 65,
'rbi' => 147
}
na
{
'avg' => '0.278',
'hr' => 65,
'rbi' => 147
}
na
{
'avg' => '0.278',
'hr' => '65',
'rbi' => '147'
}
na
{
'avg' => '0.278',
'hr' => 65,
'rbi' => 147
}
na
{
'avg' => '0.278',
'hr' => 65,
'rbi' => 147
}
na
{'avg': 0.278, 'hr': 65, 'rbi': 147}
na
{'avg': 0.278, 'hr': 65, 'rbi': 147}