@@ -84,8 +84,8 @@ A document **MUST** contain at least one of the following top-level members:
84
84
85
85
* ` data ` : the document's "primary data"
86
86
* ` errors ` : an array of [ error objects] ( #errors )
87
- * ` meta ` : a [ meta object] [ meta ] that contains non-standard
88
- meta-information .
87
+ * ` meta ` : a [ meta object] [ meta ] that contains additional information about
88
+ the document .
89
89
90
90
The members ` data ` and ` errors ` ** MUST NOT** coexist in the same document.
91
91
@@ -171,7 +171,7 @@ In addition, a resource object **MAY** contain any of these top-level members:
171
171
* ` relationships ` : a [ relationships object] [ relationships ] describing relationships between
172
172
the resource and other JSON API resources.
173
173
* ` links ` : a [ links object] [ links ] containing links related to the resource.
174
- * ` meta ` : a [ meta object] [ meta ] containing non-standard meta- information about a
174
+ * ` meta ` : a [ meta object] [ meta ] containing additional information about a
175
175
resource that can not be represented as an attribute or relationship.
176
176
177
177
Here's how an article (i.e. a resource of type "articles") might appear in a document:
@@ -267,7 +267,7 @@ A "relationship object" **MUST** contain at least one of the following:
267
267
(See [ Fetching Relationships] ( #fetching-relationships ) .)
268
268
* ` related ` : a [ related resource link]
269
269
* ` data ` : [ resource linkage]
270
- * ` meta ` : a [ meta object] [ meta ] that contains non-standard meta- information about the
270
+ * ` meta ` : a [ meta object] [ meta ] that contains additional information about the
271
271
relationship.
272
272
273
273
A relationship object that represents a to-many relationship ** MAY** also contain
@@ -371,8 +371,8 @@ resource.
371
371
372
372
A "resource identifier object" ** MUST** contain ` type ` and ` id ` members.
373
373
374
- A "resource identifier object" ** MAY** also include a ` meta ` member, whose value is a [ meta ] object that
375
- contains non-standard meta-information .
374
+ A "resource identifier object" ** MAY** also include a ` meta ` member, whose value
375
+ is a [ meta] object .
376
376
377
377
### <a href =" #document-compound-documents " id =" document-compound-documents " class =" headerlink " ></a > Compound Documents
378
378
@@ -486,8 +486,8 @@ multiple times.
486
486
### <a href =" #document-meta " id =" document-meta " class =" headerlink " ></a > Meta Information
487
487
488
488
Where specified, a ` meta ` member can be used to include non-standard
489
- meta-information. The value of each ` meta ` member ** MUST ** be an object (a
490
- "meta object").
489
+ meta-information or additional information associated with a [ profile extension ] ( #extending ) .
490
+ The value of each ` meta ` member ** MUST ** be an object (a "meta object").
491
491
492
492
Any members ** MAY** be specified within ` meta ` objects.
493
493
@@ -521,8 +521,7 @@ Within this object, a link **MUST** be represented as either:
521
521
* a string containing the link's URL.
522
522
* <a id =" document-links-link-object " ></a >an object ("link object") which can contain the following members:
523
523
* ` href ` : a string containing the link's URL.
524
- * ` meta ` : a meta object containing non-standard meta-information about the
525
- link.
524
+ * ` meta ` : a [ meta object] [ meta ] containing additional information about the link.
526
525
527
526
Except for the ` profile ` key, each key present in a links object ** MUST** have
528
527
a single link as its value. The ` profile ` key, if present, ** MUST** hold an
@@ -595,10 +594,14 @@ the URI `http://example.org/`:
595
594
596
595
A JSON API document ** MAY** include information about its implementation
597
596
under a top-level ` jsonapi ` member. If present, the value of the ` jsonapi `
598
- member ** MUST** be an object (a "jsonapi object"). The jsonapi object ** MAY**
599
- contain a ` version ` member whose value is a string indicating the highest JSON
600
- API version supported. This object ** MAY** also contain a ` meta ` member, whose
601
- value is a [ meta] object that contains non-standard meta-information.
597
+ member ** MUST** be an object (a "jsonapi object").
598
+
599
+ The jsonapi object ** MAY** contain a ` version ` member whose value is a string
600
+ indicating the highest JSON API version supported.
601
+
602
+ This object ** MAY** also contain a ` meta ` member, whose value is a [ meta object] [ meta ]
603
+ that contains non-standard meta-information. The ` meta ` object in the jsonapi
604
+ object ** MAY NOT** contain [ profile extension data] ( #extending-profile-extensions-applying ) .
602
605
603
606
``` json
604
607
{
@@ -1859,7 +1862,7 @@ them. When one or more profile extensions are used in a JSON API document:
1859
1862
2 . The document ** MUST** define an [ alias] [ aliases ] for each extension's URI.
1860
1863
1861
1864
The alias for an extension's URI ** MAY** be used as a key (an "extension-associated
1862
- key"). The value at any such key is interpreted according the specification of
1865
+ key") within a ` meta ` . The value at any such key is interpreted according the specification of
1863
1866
the extension to which the key name maps.
1864
1867
1865
1868
The same extension-associated key ** MAY** appear more than once in a given
@@ -1868,12 +1871,10 @@ document.
1868
1871
An extension-associated key ** MUST NOT** be added at any location where the
1869
1872
extension's specification does not define how to interpret the key's value.
1870
1873
1871
- > In practice, extension-associated keys are only allowed in a subset of the
1872
- places where a meta object can occur. This is because extensions are also
1873
- [ limited] ( #extending-profile-extensions-characteristics ) in where they can
1874
- permit their data to appear. In particular, extension-associated keys are
1875
- _ not_ allowed anywhere within attributes objects or meta objects, or as keys
1876
- directly under ` relationships ` and ` links ` objects.
1874
+ > In practice, extension-associated keys are only allowed as children of a
1875
+ ` "meta" ` object, and only when that ` "meta" ` object is not within the
1876
+ ` "jsonapi" ` object. This is because extensions are also [ limited] ( #extending-profile-extensions-characteristics )
1877
+ in where they can permit their data to appear.
1877
1878
1878
1879
The following document demonstrates these rules by adding a hypothetical
1879
1880
extension that has the URI ` http://jsonapi.org/extensions/last-modified ` :
@@ -1895,11 +1896,19 @@ extension that has the URI `http://jsonapi.org/extensions/last-modified`:
1895
1896
},
1896
1897
"relationships" : {
1897
1898
"father" : {
1898
- "data" : { "type" : " people" , "id" : " 7" },
1899
- "last-modified" : " 2013-09-24T00:00:00Z"
1899
+ "data" : {
1900
+ "type" : " people" , "id" : " 7"
1901
+ },
1902
+ "meta" : {
1903
+ "last-modified" : " 2013-09-24T00:00:00Z"
1904
+ }
1900
1905
}
1901
1906
},
1902
- "last-modified" : { "date" : " 2015-01-01T00:00:00Z" , "fields" : [" first-name" ] }
1907
+ "meta" : {
1908
+ "last-modified" : {
1909
+ "date" : " 2015-01-01T00:00:00Z" , "fields" : [" first-name" ]
1910
+ }
1911
+ }
1903
1912
}
1904
1913
}
1905
1914
```
@@ -1996,14 +2005,10 @@ particular order relative to the other extensions in use.
1996
2005
1997
2006
A profile extension ** MUST** only define a set of allowed values, and the
1998
2007
meaning of those values. These values ** MAY** be defined for use in any
1999
- spec-defined object that allows a [ meta object] [ meta ] , at the same level where
2000
- that meta object is allowed to appear. The one exception is that an extension
2001
- ** MUST NOT** define values for use in the [ ` jsonapi ` object] ( #document-jsonapi-object ) .
2002
-
2003
- > Note: the above restriction implies that profile extensions may not define
2004
- values for use within the specification-defined ` "attributes" ` , ` "meta" ` , or
2005
- ` "aliases" ` objects, or as a key in a [ ` links ` object] [ links ] , because meta
2006
- objects are not allowed in these places.
2008
+ spec-defined [ meta object] [ meta ] , with the exception is that an extension
2009
+ ** MUST NOT** define values for use in the [ ` jsonapi ` object] ( #document-jsonapi-object ) 's
2010
+ meta object. A profile extension ** MUST NOT** define any values for use outside
2011
+ of a meta object.
2007
2012
2008
2013
The meaning of an extension-defined value ** MAY** vary based on where it occurs
2009
2014
in the document but ** MUST NOT** vary based on the presence or absence of other
@@ -2022,10 +2027,6 @@ in objects added to the document by other profile extensions.
2022
2027
The keys in any profile-extension-defined objects ** MUST** only contain the
2023
2028
characters a-z (U+0061 to U+007A).
2024
2029
2025
- > Note: Future keys defined by this specification will also follow the above
2026
- restriction, gauranteeing that extension alias names are differentiable from
2027
- keys with a fixed meaning.
2028
-
2029
2030
Profile extensions ** MAY** be updated over time to add new capabilities, by
2030
2031
revising their registration. However, any such changes ** MUST** be [ backwards and
2031
2032
forwards compatible] ( http://www.w3.org/2001/tag/doc/versioning-compatibility-strategies#terminology ) .
@@ -2101,8 +2102,7 @@ An error object **MAY** have the following members:
2101
2102
(depending on which type of value is missing) that can be added to resolve
2102
2103
this error.
2103
2104
2104
- * ` meta ` : a [ meta object] [ meta ] containing non-standard meta-information about the
2105
- error.
2105
+ * ` meta ` : a [ meta object] [ meta ] containing additional information about the error.
2106
2106
2107
2107
> Note: Previous versions of this specification defined a ` code ` member in
2108
2108
error objects. The role of that member is now played instead by the ` type `
0 commit comments