Content
Schema
-
A content block:
-
must be an object
-
must have an id property
-
must have a type property
-
must have either a data or an url property
-
may have a meta property
-
-
The id property:
- must be a string
-
The type property:
-
must be a string
-
must hold a MIME type
-
-
The url property:
- must be a string
-
The data property:
-
must be a string
-
may have an associated encoding property
-
The encoding property:
- must be a string
-
-
The meta property:
- must satisfy the metadata schema
Examples
Html
{
"id": "1",
"type": "text/html",
"data": "<p>Lorem ipsum dolor sit amet</p>"
}
Distant media
{
"id": "1",
"type": "image/png",
"url": "http://domain.com/image-1.png"
}
Embedded media
{
"id": "1",
"type": "image/png",
"encoding": "base64",
"data": "f47544a4211f454e12"
}
Metadata
{
"id": "1",
"type": "image/png",
"url": "http://domain.com/cat.png",
"meta": {
"authors": [
{
"name": "John Doe",
"email": "john@mail.com"
}
],
"license": "CC",
"created": "2012-08-09",
"description": "A black cat"
}
}