{
  "version": "current-js-json-v1",
  "description": "Inputs and expected outputs for the current JavaScript canonicalJson implementation.",
  "cases": [
    {
      "name": "recursive-lexical-sort",
      "input": {
        "z": 3,
        "a": {
          "z": true,
          "a": [
            {
              "b": 2,
              "a": 1
            }
          ]
        },
        "middle": "value"
      },
      "canonical": "{\"a\":{\"a\":[{\"a\":1,\"b\":2}],\"z\":true},\"middle\":\"value\",\"z\":3}"
    },
    {
      "name": "utf16-key-order",
      "input": {
        "": "bmp-private-use",
        "𐀀": "astral",
        "￿": "bmp-max",
        "a": "ascii"
      },
      "canonical": "{\"a\":\"ascii\",\"𐀀\":\"astral\",\"\":\"bmp-private-use\",\"￿\":\"bmp-max\"}"
    },
    {
      "name": "integer-index-enumeration-wins-after-sort",
      "input": {
        "10": "ten",
        "2": "two",
        "01": "leading-zero",
        "1": "one",
        "4294967294": "last-index",
        "4294967295": "not-an-index",
        "-0": "negative-zero-key"
      },
      "canonical": "{\"1\":\"one\",\"2\":\"two\",\"10\":\"ten\",\"4294967294\":\"last-index\",\"-0\":\"negative-zero-key\",\"01\":\"leading-zero\",\"4294967295\":\"not-an-index\"}"
    },
    {
      "name": "number-boundaries",
      "input": {
        "negativeZero": -0.0,
        "smallScientific": 1e-7,
        "smallFixed": 1e-6,
        "largeFixed": 1e20,
        "largeScientific": 1e21,
        "roundedInteger": 1000000000000000100,
        "nullValue": null
      },
      "canonical": "{\"largeFixed\":100000000000000000000,\"largeScientific\":1e+21,\"negativeZero\":0,\"nullValue\":null,\"roundedInteger\":1000000000000000100,\"smallFixed\":0.000001,\"smallScientific\":1e-7}"
    },
    {
      "name": "escaping-and-surrogates",
      "input": {
        "text": "\" slash / tab\tnewline\nline-separator  emoji 😀 lone-surrogate \ud800"
      },
      "canonical": "{\"text\":\"\\\" slash / tab\\tnewline\\nline-separator  emoji 😀 lone-surrogate \\ud800\"}"
    },
    {
      "name": "arrays-retain-order-and-null",
      "input": [
        {
          "b": 2,
          "a": 1
        },
        -0.0,
        null,
        1e-7
      ],
      "canonical": "[{\"a\":1,\"b\":2},0,null,1e-7]"
    },
    {
      "name": "missing-members-are-not-invented",
      "input": {
        "payload": {
          "content": "missing timestamp and key remain missing"
        }
      },
      "canonical": "{\"payload\":{\"content\":\"missing timestamp and key remain missing\"}}"
    },
    {
      "name": "normal-object-proto-property-is-not-emitted",
      "input": {
        "__proto__": {
          "unexpected": "prototype assignment"
        },
        "constructor": "ordinary-own-property",
        "value": 1
      },
      "canonical": "{\"constructor\":\"ordinary-own-property\",\"value\":1}"
    }
  ]
}