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

CAMP needs to say something about the serialization of null attribute values and empty arrays

    XMLWordPrintable

    Details

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

      Description

      The following JSON:

      {
      "uri" : "http://slc03lgx.us.oracle.com/campSrv/Assembly/9",
      "name" : "/examples",
      "description" : null,
      "created" : "2012-11-14T08:33-0800",
      "tags": []
      ...
      }

      Is semantically equivalent to:

      {
      "uri" : "http://slc03lgx.us.oracle.com/campSrv/Assembly/9",
      "name" : "/examples",
      "created" : "2012-11-14T08:33-0800",
      ...
      }

      However, different languages and mappings treat these representations in different ways. For the sake of interoperability we should consider avoiding these differences by adding requirements to CAMP regarding the serialization of empty arrays and non-existent values.

      We could:

      1.) say that clients and servers MUST NOT send either 'null' attributes or empty arrays

      2.) say that clients and servers SHOULD NOT send either 'null' attributes or empty arrays

      3.) say that clients and servers MUST NOT send 'null' attributes and SHOULD NOT send empty arrays

      4.) say that clients and servers SHOULD NOT send 'null' attributes and MUST NOT send empty arrays

      We could also blow out the above choices with the additional factor of allowing clients and servers to have different behavior. For example "Clients MUST NOT send 'null' attributes but servers SHOULD accept them". I've had experience with this sort of thing (in the WS-I profiles) and it rapidly gets weird. IMO it is naturally outside the scope of any specification to define how one party in an interaction should behave in the face of non-compliant behavior on the part of another party. If a CAMP service implementation wanted to be "generous in what it receives", it should be free to do that, but I don't think we can mandate that behavior.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated: