blob: 3fedb75b572885f3dacb3d9226bfb475f0d16d2c [file] [log] [blame]
Test JSON formatting.
== Running test suite: JSFormatter.JSON
-- Running test case: JSFormatter.ValidJSON
JSON: "{\"a\":123,\"b\":[1,2,3],\"c\":{\"d\":\"e\"}}"
PASS: JSON should be valid.
FORMATTED:
{
"a": 123,
"b": [
1,
2,
3
],
"c": {
"d": "e"
}
}
-- Running test case: JSFormatter.InvalidButObject
JSON: "{a:123,b:[1,2,3],c:{d:\"e\"}}"
PASS: JSON should be invalid.
PASS: Should be able to be evaluated to an object.
FORMATTED:
{
a: 123,
b: [1, 2, 3],
c: {
d: "e"
}
}
-- Running test case: JSFormatter.InvalidWithComments
JSON: "{\"a\":123,\"b\":[1,2,3],\"c\":{\"d\":\"e\"}}/*Comment*/"
PASS: JSON should be invalid.
PASS: Should be able to be evaluated to an object.
FORMATTED:
{
"a": 123,
"b": [1, 2, 3],
"c": {
"d": "e"
}
} /*Comment*/
-- Running test case: JSFormatter.Invalid
INPUT: "{a:1 b:2}"
PASS: JSON should be invalid.
PASS: Should not be able to be evaluated to an object.
PASS: Response should be null.