@@ -4340,9 +4340,9 @@ <h3>Restrictions on JSON-LD</h3>
4340
4340
< section class ="notoc ">
4341
4341
< h3 > Lists and Arrays</ h3 >
4342
4342
< p >
4343
- Lists, arrays, and even lists of lists, are possible when using [[JSON-LD11]] 1.1 .
4344
- We encourage those who want RDF semantics in use
4345
- cases requiring lists and arrays to follow the guidance on
4343
+ Lists, arrays, and even lists of lists, are possible when using [[[ JSON-LD11]]] .
4344
+ We encourage those who want RDF semantics in use cases requiring lists and
4345
+ arrays to follow the guidance on
4346
4346
< a href ="https://www.w3.org/TR/json-ld11/#lists "> lists in JSON-LD 1.1</ a > .
4347
4347
</ p >
4348
4348
< p >
@@ -4351,14 +4351,15 @@ <h3>Lists and Arrays</h3>
4351
4351
</ p >
4352
4352
< p class ="note "
4353
4353
title ="Array order might not matter ">
4354
- While it is possible to use this data model without any JSON-LD processing,
4355
- those who do so and make use of arrays need to be aware that unless the above
4356
- guidance is followed, the order of items in an array cannot be guaranteed in
4357
- JSON-LD. This might lead to unexpected behavior.
4354
+ While it is possible to use this data model by performing [=type-specific
4355
+ credential processing=], those who do so and make use of arrays need to be aware
4356
+ that unless the above guidance is followed, the order of items in an array
4357
+ are not guaranteed in JSON-LD. This might lead to unexpected behavior.
4358
4358
</ p >
4359
4359
< p >
4360
- If JSON structure or ordering is important to your application,
4361
- we recommend you mark such elements as `@json` via an `@context`.
4360
+ If JSON structure or ordering is important to your application, we recommend you
4361
+ mark such elements as `@json` via an `@context` that is specific to your
4362
+ use case. An example of such a declaration is shown below.
4362
4363
</ p >
4363
4364
< pre class ="example " title ="A @context file that defines a matrix as an embedded JSON data structure ">
4364
4365
{
@@ -4371,6 +4372,14 @@ <h3>Lists and Arrays</h3>
4371
4372
}
4372
4373
}
4373
4374
</ pre >
4375
+
4376
+ < p >
4377
+ When the context shown above is used in the example below, by including the
4378
+ `https://website.example/matrix/v1` context in the `@context` property, the
4379
+ value in `credentialSubject.matrix` retains its JSON semantics; the exact order
4380
+ of all elements in the two dimensional matrix is preserved.
4381
+ </ p >
4382
+
4374
4383
< pre class ="example " title ="A verifiable credential with an embedded JSON data structure ">
4375
4384
{
4376
4385
"@context": [
0 commit comments