OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

xacml message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: Shorthand notation in JSON profile and unmarshalling

Another note regarding the shorthand notation.

All the properties in the JSON profiles are capitalized (e.g. AttributeId, Category, Value...). The shorthand names should follow the same convention.

Any objections?

On Thu, Apr 17, 2014 at 2:42 PM, David Brossard <david.brossard@axiomatics.com> wrote:

The consensus on the list is to be consistent. Therefore the subject category should be called "access-subject" in JSON.

However, there is one drawback, and it's not specific to subject. Any key that uses a hyphen or whitespace or other special characters (:,;...) is not user-friendly.

This means that it might be better to take another approach to shorthand naming. For instance CamelCase:

access-subject would become accessSubject.

The reason is that in languages that automatically unmarshall JSON into objects won't be able to use the property name as a means to access the value e.g.

request.access-subject will not work for obvious reasons. The proper way is to do request["access-subject"].

request.accessSubject would though.

These are the values that would need a CamelCase version:









Thoughts? Put up with request["access-subject"]? Change the shorthand naming convention?


David Brossard, M.Eng, SCEA, CSTP
VP of Customer Relations
+46(0)760 25 85 75
Axiomatics AB
Skeppsbron 40
S-111 30 Stockholm, Sweden
Support: https://support.axiomatics.com 
Web: http://www.axiomatics.com
Axiomatics for developers: http://developers.axiomatics.com
Connect with us on LinkedIn | Twitter | Google + | Facebook | YouTube

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]