Trailing comma is not allowed in JSONArray and JSONObject

XMLWordPrintable

    • Type: Sub-task
    • Resolution: Fixed
    • Priority: P3
    • 8
    • Affects Version/s: 8
    • Component/s: core-libs
    • None
    • b110
    • generic
    • generic

      See ECMA section 15.12.1.2 The JSON Syntactic Grammar

      jjs> JSON.parse('[0,]')

      Expected: JSON SyntaxError
      Actual: No SyntaxError

      jjs> JSON.parse('{"a":0,}')

      Expected: JSON SyntaxError
      Actual: No SyntaxError

            Assignee:
            Sundararajan Athijegannathan
            Reporter:
            Sundararajan Athijegannathan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: