Paul,
> -----Original Message-----
> From: Tyson, Paul H [mailto:]
> Sent: Tuesday, April 24, 2012 3:38 PM
> To: Sinnema, Remon;
> Subject: RE: Media types
>
> Following your reasoning that media types are used mainly for content
> negotiation, why do we even need specialized media types for XACML?
http://tools.ietf.org/html/rfc3023#page-32
There could be other XML based formats that represent the same information as application/xacml+xml. For instance, a policy could potentially also be represented by RDF-XML (application/rdf+xml).
> The currently defined top-level syntactic entities--Policy, PolicySet,
> Request, Response--will just be "text/xml".
http://tools.ietf.org/html/rfc3023#section-3
Anything in the "text" branch is supposed to be readable for a *casual* user. That's definitely not the case for XACML, so we need a media type from the "application" branch.
> If we do move forward with an "application/xacml+json" type, I don't
> think the profile should include examples. The TC has not specified any
> JSON representation of XACML entities, and the examples in this profile
> would be misleading. The profile should state clearly that this media
> type does not imply any particular mapping from XACML XML syntax to
> JSON data structures.
The JSON format needs to be defined somewhere, or else JSON based systems can't interoperate. So we have two options:
(1) We define the JSON representation in this profile
(2) We create a separate JSON profile and refer to that from here
I was shooting for (1), with the examples being the "specification" of the JSON format.
Unfortunately, there is no JSON equivalent of XML Schema. I think the best we can do is something like this:
http://amundsen.com/media-types/collection/format/#objects
Thanks,
Ray