[whatwg] microdata questions
ian at hixie.ch
Tue Apr 1 12:01:46 PDT 2014
On Mon, 10 Feb 2014, Eric Devine wrote:
> 1. Section 5.5.1 of the Microdata spec prescribes how microdata should
> be respresented as JSON, but it does provide a MIME type. I'm writing a
> REST API that I would like to be able to return JSON in microdata
> format, but I need the client to explicitly request this via the HTTP
> Accept header. The main concern is to know when to return plain
> properties as an array with one element.
As a general rule I would recommend against using Accept headers to do
anything. You're better off making the JSON data its own resource, IMHO.
Having said that, as you noted in a later e-mail, the MIME type suggested
by the HTML spec is "application/microdata+json".
> 2. Section 5.2.4 does not provide a way to apply a property value to the
> value attribute of an <option> element. Is this an oversight, or is
> there simply not a convincing enough use case for the need?
There's not any way currently to make for controls map to microdata. It's
not clear exactly what it would mean.
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg