json-processing-spec
  1. json-processing-spec
  2. JSON_PROCESSING_SPEC-2

A reader.readObject() call that reads JsonObject stream with duplicate keys should throw exception

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0-pr
    • Labels:
      None

      Description

      reader = new JsonReader(new StringReader("

      {\"foo\":\"bar\",\"foo\":\"foo\"}

      "));
      JsonValue jv = reader.readObject();

      It seems that the above readObject() should throw an exception if duplicate keys exist within an object.

        Activity

        Hide
        jitu added a comment -

        It just overwrites the mapping with new values(similar to Map)

        Show
        jitu added a comment - It just overwrites the mapping with new values(similar to Map)

          People

          • Assignee:
            jitu
            Reporter:
            adf59
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: