Zuzu
view release on metacpan or search on metacpan
stdlib/test-fixtures/toon/decode/arrays-nested.json view on Meta::CPAN
"specSection": "9.2"
},
{
"name": "parses empty root-level array",
"input": "[0]:",
"expected": [],
"specSection": "9.1"
},
{
"name": "parses complex mixed object with arrays and nested objects",
"input": "user:\n id: 123\n name: Ada\n tags[2]: reading,gaming\n active: true\n prefs[0]:",
"expected": {
"user": {
"id": 123,
"name": "Ada",
"tags": ["reading", "gaming"],
"active": true,
"prefs": []
}
},
"specSection": "8"
},
{
"name": "parses arrays mixing primitives, objects, and strings in list format",
"input": "items[3]:\n - 1\n - a: 1\n - text",
"expected": {
"items": [1, { "a": 1 }, "text"]
},
stdlib/test-fixtures/toon/encode/arrays-nested.json view on Meta::CPAN
"specSection": "9.1"
},
{
"name": "encodes complex nested structure",
"input": {
"user": {
"id": 123,
"name": "Ada",
"tags": ["reading", "gaming"],
"active": true,
"prefs": []
}
},
"expected": "user:\n id: 123\n name: Ada\n tags[2]: reading,gaming\n active: true\n prefs[0]:",
"specSection": "8"
},
{
"name": "uses list format for arrays mixing primitives and objects",
"input": {
"items": [1, { "a": 1 }, "text"]
},
"expected": "items[3]:\n - 1\n - a: 1\n - text",
"specSection": "9.4"
},
( run in 0.726 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )