Re: JSON Profile Issues (was Re: [xacml] Thursday Meeting)

From
David Brossard <>
Date
2013-05-10T23:20:46+00:00
ID
CABSq=NLx6HVfGtSAsBwTyNLduoy8xC4=
Thread
Re: JSON Profile Issues (was Re: [xacml] Thursday Meeting)
Regarding the following

The examples show instances where what is described as an array in the

text is shown instead as a single value (noting that an object is a JSON

value). I think it would be useful to make a statement somewhere early in

the profile that an array with a single JSON value MAY, or MUST if that is

your intent, be encoded directly as that value rather than as an array

of one value (although the profile would be easier to implement if an

array is always an array, even if it has only one value).

Section 5.2.5: I found the wording "It is simply an array of ..." misleading,

suggesting something like this:

  Obligations:[{

   Id:"urn:oasis:names:tc:xacml:3.0:ipc:obligation:encrypt"

  },

  {

   Id:"urn:oasis:names:tc:xacml:3.0:ipc:obligation:marking",

   AttributeAssignment:{

    AttributeId:"urn:oasis:names:tc:xacml:3.0:example:attribute:text",

    DataType:"http://www.w3.org/2001/XMLSchema#string"

   }

  }]

rather than this:

  Obligations:{

   ObligationsOrAdvice:[{

    Id:"urn:oasis:names:tc:xacml:3.0:ipc:obligation:encrypt"

   },

   {

    Id:"urn:oasis:names:tc:xacml:3.0:ipc:obligation:marking",

    AttributeAssignment:{

     AttributeId:"urn:oasis:names:tc:xacml:3.0:example:attribute:text",

     DataType:"http://www.w3.org/2001/XMLSchema#string"

    }

   }]

  }

Assuming the latter is correct, then it would be better to say "It simply

contains an array of ...".

I don't actually see the point in a double-nesting.

So I would rather have "Obligations": [{"Id":"",.......],{}]

rather than "Obligations": {"ObligationOrAdvice" :  [{"Id":"",.......],{}] }

It also applies to Advice as you pointed out and to Response / Result.

Am I missing a JSON subtlety here?