#!/www/server/bin/php -qC "bar", "qux", 42 => "quux"]), '{"foo":"bar","0":"qux","42":"quux"}', 'key-value pairs' ); is( itjs::serialize(['foo' => ['bar' => ["qux", 42]]]), '{"foo":{"bar":["qux",42]}}', 'nested arrays' ); is( itjs::serialize(['import' => ['function' => [true, 42]]]), '{"import":{"function":[true,42]}}', 'keywords' ); is( itjs::serialize(['foo"foo' => "bar"]), '{"foo\"foo":"bar"}', "quote ' in keys" ); is( itjs::serialize(""), '"<\\/script>"', "quote slashes" ); is( itjs::serialize("hellö"), '"hellö"', "don't encode utf8" );