f497f9fe231e0e400f339c84a7d80c4aae2ac4d5Joshua M. Clulow * This file and its contents are supplied under the terms of the
f497f9fe231e0e400f339c84a7d80c4aae2ac4d5Joshua M. Clulow * Common Development and Distribution License ("CDDL"), version 1.0.
f497f9fe231e0e400f339c84a7d80c4aae2ac4d5Joshua M. Clulow * You may only use this file in accordance with the terms of version
f497f9fe231e0e400f339c84a7d80c4aae2ac4d5Joshua M. Clulow * 1.0 of the CDDL.
f497f9fe231e0e400f339c84a7d80c4aae2ac4d5Joshua M. Clulow * A full copy of the text of the CDDL should have accompanied this
f497f9fe231e0e400f339c84a7d80c4aae2ac4d5Joshua M. Clulow * source. A copy of the CDDL is also available via the Internet at
f497f9fe231e0e400f339c84a7d80c4aae2ac4d5Joshua M. Clulow * Copyright 2012, Joyent, Inc. All rights reserved.
f497f9fe231e0e400f339c84a7d80c4aae2ac4d5Joshua M. Clulow * General functional tests of JSON parser for json().
f497f9fe231e0e400f339c84a7d80c4aae2ac4d5Joshua M. Clulow TST("one-element array: hex integer (not in spec, not supported)");
f497f9fe231e0e400f339c84a7d80c4aae2ac4d5Joshua M. Clulow TST("one-element array: float + exponent");
f497f9fe231e0e400f339c84a7d80c4aae2ac4d5Joshua M. Clulow TST("one-element array: integer + whitespace");
f497f9fe231e0e400f339c84a7d80c4aae2ac4d5Joshua M. Clulow TST("one-element array: integer + exponent + whitespace");
f497f9fe231e0e400f339c84a7d80c4aae2ac4d5Joshua M. Clulow IN("[ { \"first\": true, \"second\": false }]");
f497f9fe231e0e400f339c84a7d80c4aae2ac4d5Joshua M. Clulow IN("[0,1,1,2,3,5,8,13,21,34,55,89,144,233,377]");
f497f9fe231e0e400f339c84a7d80c4aae2ac4d5Joshua M. Clulow IN2("[\"string\",32,true,{\"a\":9,\"b\":false},100.3e10,false,200.5,",
f497f9fe231e0e400f339c84a7d80c4aae2ac4d5Joshua M. Clulow "{\"key\":\"val\"},null]");
f497f9fe231e0e400f339c84a7d80c4aae2ac4d5Joshua M. Clulow TST("many-element array: multiple types + whitespace");
f497f9fe231e0e400f339c84a7d80c4aae2ac4d5Joshua M. Clulow IN2("\n[\t\"string\" ,\t32 , true\t,\t {\"a\": 9,\t\"b\": false},\t\t",
f497f9fe231e0e400f339c84a7d80c4aae2ac4d5Joshua M. Clulow "100.3e10, false, 200.5,{\"key\" \t:\n \"val\"},\t\t null ]\t\t");
f497f9fe231e0e400f339c84a7d80c4aae2ac4d5Joshua M. Clulow TST("two-element array: various string escape codes");
f497f9fe231e0e400f339c84a7d80c4aae2ac4d5Joshua M. Clulow IN2("[\"abcd \\\" \\\\ \\/ \\b \\f \\n \\r \\t \\u0000 \\uf00F \", ",
f497f9fe231e0e400f339c84a7d80c4aae2ac4d5Joshua M. Clulow "\"final\"]");
f497f9fe231e0e400f339c84a7d80c4aae2ac4d5Joshua M. Clulow TST("three-element array: broken escape code");
f497f9fe231e0e400f339c84a7d80c4aae2ac4d5Joshua M. Clulow IN("[\"fine here\", \"dodgey \\u00AZ\", \"wont get here\"]");
f497f9fe231e0e400f339c84a7d80c4aae2ac4d5Joshua M. Clulow IN2("{ \"top\": { \"mid\" : { \"legs\": \"feet\" }, \"number\": 9, ",
f497f9fe231e0e400f339c84a7d80c4aae2ac4d5Joshua M. Clulow "\"array\":[0,1,{\"a\":true,\"bb\":[1,2,false,{\"x\":\"yz\"}]}]}}");