Uploaded image for project: 'OASIS Cloud Application Management for Platforms (CAMP) TC'
  1. OASIS Cloud Application Management for Platforms (CAMP) TC
  2. CAMP-50

spec needs to clarify behavior in the case of duplicate JSON keys

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Spec
    • Labels:
      None

      Description

      In section 2.2 of RFC 4627 (http://www.ietf.org/rfc/rfc4627.txt) it states that :

      "An object structure is represented as a pair of curly brackets surrounding zero or more name/value pairs (or members). A name is a string. A single colon comes after each name, separating the name from the value. A single comma separates a value from a following name. The names within an object SHOULD be unique."

      The SHOULD in the last sentence means that "if implementations think they have a valid reason, they can have duplicate names in an object". If you search the net you can find a number of different strategies for dealing with duplicate names/keys. To improve interoperability, CAMP needs to clarify its position with respect to duplicate keys.

      High-level proposal: CAMP should further constrain RFC 4627 by saying that clients and the servers MUST NOT send JSON that contains duplicate keys. The clients or servers response to a message containing multiple keys should be left undefined - i.e. CAMP should not require servers to send an error response if/when they detect multiple keys.

        Attachments

          Activity

            People

            • Assignee:
              adrian.otto Adrian Otto (Inactive)
              Reporter:
              gilbert.pilz Gilbert Pilz (Inactive)
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: