@twin.org/data-json-ld 0.0.2-next.4 → 0.0.3-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/dist/es/dataTypes/jsonLdDataTypes.js +171 -0
  2. package/dist/es/dataTypes/jsonLdDataTypes.js.map +1 -0
  3. package/dist/es/index.js +33 -0
  4. package/dist/es/index.js.map +1 -0
  5. package/dist/es/models/IJsonLdContainerType.js +4 -0
  6. package/dist/es/models/IJsonLdContainerType.js.map +1 -0
  7. package/dist/es/models/IJsonLdContainerTypeArray.js +2 -0
  8. package/dist/es/models/IJsonLdContainerTypeArray.js.map +1 -0
  9. package/dist/es/models/IJsonLdContextDefinition.js +2 -0
  10. package/dist/es/models/IJsonLdContextDefinition.js.map +1 -0
  11. package/dist/es/models/IJsonLdContextDefinitionElement.js +2 -0
  12. package/dist/es/models/IJsonLdContextDefinitionElement.js.map +1 -0
  13. package/dist/es/models/IJsonLdContextDefinitionRoot.js +2 -0
  14. package/dist/es/models/IJsonLdContextDefinitionRoot.js.map +1 -0
  15. package/dist/es/models/IJsonLdDocument.js +2 -0
  16. package/dist/es/models/IJsonLdDocument.js.map +1 -0
  17. package/dist/es/models/IJsonLdExpandedTermDefinition.js +2 -0
  18. package/dist/es/models/IJsonLdExpandedTermDefinition.js.map +1 -0
  19. package/dist/es/models/IJsonLdGraphObject.js +2 -0
  20. package/dist/es/models/IJsonLdGraphObject.js.map +1 -0
  21. package/dist/es/models/IJsonLdIdMap.js +2 -0
  22. package/dist/es/models/IJsonLdIdMap.js.map +1 -0
  23. package/dist/es/models/IJsonLdIncludedBlock.js +2 -0
  24. package/dist/es/models/IJsonLdIncludedBlock.js.map +1 -0
  25. package/dist/es/models/IJsonLdIndexMap.js +2 -0
  26. package/dist/es/models/IJsonLdIndexMap.js.map +1 -0
  27. package/dist/es/models/IJsonLdIndexMapItem.js +2 -0
  28. package/dist/es/models/IJsonLdIndexMapItem.js.map +1 -0
  29. package/dist/es/models/IJsonLdJsonArray.js +2 -0
  30. package/dist/es/models/IJsonLdJsonArray.js.map +1 -0
  31. package/dist/es/models/IJsonLdJsonObject.js +2 -0
  32. package/dist/es/models/IJsonLdJsonObject.js.map +1 -0
  33. package/dist/es/models/IJsonLdJsonPrimitive.js +4 -0
  34. package/dist/es/models/IJsonLdJsonPrimitive.js.map +1 -0
  35. package/dist/es/models/IJsonLdJsonValue.js +2 -0
  36. package/dist/es/models/IJsonLdJsonValue.js.map +1 -0
  37. package/dist/es/models/IJsonLdLanguageMap.js +4 -0
  38. package/dist/es/models/IJsonLdLanguageMap.js.map +1 -0
  39. package/dist/es/models/IJsonLdListObject.js +2 -0
  40. package/dist/es/models/IJsonLdListObject.js.map +1 -0
  41. package/dist/es/models/IJsonLdListOrSetItem.js +2 -0
  42. package/dist/es/models/IJsonLdListOrSetItem.js.map +1 -0
  43. package/dist/es/models/IJsonLdNodeObject.js +2 -0
  44. package/dist/es/models/IJsonLdNodeObject.js.map +1 -0
  45. package/dist/es/models/IJsonLdNodePrimitive.js +2 -0
  46. package/dist/es/models/IJsonLdNodePrimitive.js.map +1 -0
  47. package/dist/es/models/IJsonLdObject.js +2 -0
  48. package/dist/es/models/IJsonLdObject.js.map +1 -0
  49. package/dist/es/models/IJsonLdSetObject.js +2 -0
  50. package/dist/es/models/IJsonLdSetObject.js.map +1 -0
  51. package/dist/es/models/IJsonLdTypeMap.js +2 -0
  52. package/dist/es/models/IJsonLdTypeMap.js.map +1 -0
  53. package/dist/es/models/IJsonLdValueObject.js +2 -0
  54. package/dist/es/models/IJsonLdValueObject.js.map +1 -0
  55. package/dist/es/models/jsonLdContexts.js +13 -0
  56. package/dist/es/models/jsonLdContexts.js.map +1 -0
  57. package/dist/es/models/jsonLdTypes.js +113 -0
  58. package/dist/es/models/jsonLdTypes.js.map +1 -0
  59. package/dist/es/schemas/JsonLdContainerType.json +13 -0
  60. package/dist/es/schemas/JsonLdContainerTypeArray.json +179 -0
  61. package/dist/es/schemas/JsonLdContextDefinition.json +76 -0
  62. package/dist/es/schemas/JsonLdContextDefinitionElement.json +16 -0
  63. package/dist/es/schemas/JsonLdContextDefinitionRoot.json +16 -0
  64. package/dist/es/schemas/JsonLdDocument.json +48 -0
  65. package/dist/es/schemas/JsonLdExpandedTermDefinition.json +136 -0
  66. package/dist/es/schemas/JsonLdGraphObject.json +44 -0
  67. package/dist/es/schemas/JsonLdIdMap.json +9 -0
  68. package/dist/es/schemas/JsonLdIncludedBlock.json +16 -0
  69. package/dist/es/schemas/JsonLdIndexMap.json +19 -0
  70. package/dist/es/schemas/JsonLdIndexMapItem.json +31 -0
  71. package/dist/es/schemas/JsonLdJsonArray.json +9 -0
  72. package/dist/es/schemas/JsonLdJsonObject.json +16 -0
  73. package/dist/es/schemas/JsonLdJsonPrimitive.json +11 -0
  74. package/dist/es/schemas/JsonLdJsonValue.json +16 -0
  75. package/dist/es/schemas/JsonLdLanguageMap.json +22 -0
  76. package/dist/es/schemas/JsonLdListObject.json +28 -0
  77. package/dist/es/schemas/JsonLdListOrSetItem.json +25 -0
  78. package/dist/es/schemas/JsonLdNodeObject.json +100 -0
  79. package/dist/es/schemas/JsonLdNodePrimitive.json +34 -0
  80. package/dist/es/schemas/JsonLdObject.json +76 -0
  81. package/dist/es/schemas/JsonLdSetObject.json +28 -0
  82. package/dist/es/schemas/JsonLdTypeMap.json +16 -0
  83. package/dist/es/schemas/JsonLdValueObject.json +113 -0
  84. package/dist/es/utils/jsonLdHelper.js +131 -0
  85. package/dist/es/utils/jsonLdHelper.js.map +1 -0
  86. package/dist/es/utils/jsonLdProcessor.js +375 -0
  87. package/dist/es/utils/jsonLdProcessor.js.map +1 -0
  88. package/dist/types/index.d.ts +30 -30
  89. package/dist/types/models/IJsonLdContainerTypeArray.d.ts +1 -1
  90. package/dist/types/models/IJsonLdContextDefinition.d.ts +1 -1
  91. package/dist/types/models/IJsonLdContextDefinitionElement.d.ts +1 -1
  92. package/dist/types/models/IJsonLdContextDefinitionRoot.d.ts +1 -1
  93. package/dist/types/models/IJsonLdDocument.d.ts +3 -3
  94. package/dist/types/models/IJsonLdExpandedTermDefinition.d.ts +3 -3
  95. package/dist/types/models/IJsonLdGraphObject.d.ts +2 -2
  96. package/dist/types/models/IJsonLdIdMap.d.ts +1 -1
  97. package/dist/types/models/IJsonLdIncludedBlock.d.ts +1 -1
  98. package/dist/types/models/IJsonLdIndexMap.d.ts +1 -1
  99. package/dist/types/models/IJsonLdIndexMapItem.d.ts +4 -4
  100. package/dist/types/models/IJsonLdJsonArray.d.ts +1 -1
  101. package/dist/types/models/IJsonLdJsonObject.d.ts +1 -1
  102. package/dist/types/models/IJsonLdJsonValue.d.ts +3 -3
  103. package/dist/types/models/IJsonLdListObject.d.ts +1 -1
  104. package/dist/types/models/IJsonLdListOrSetItem.d.ts +2 -2
  105. package/dist/types/models/IJsonLdNodeObject.d.ts +7 -7
  106. package/dist/types/models/IJsonLdNodePrimitive.d.ts +5 -5
  107. package/dist/types/models/IJsonLdObject.d.ts +4 -4
  108. package/dist/types/models/IJsonLdSetObject.d.ts +1 -1
  109. package/dist/types/models/IJsonLdTypeMap.d.ts +1 -1
  110. package/dist/types/models/IJsonLdValueObject.d.ts +3 -3
  111. package/dist/types/utils/jsonLdHelper.d.ts +20 -1
  112. package/dist/types/utils/jsonLdProcessor.d.ts +4 -4
  113. package/docs/changelog.md +50 -0
  114. package/docs/reference/classes/JsonLdHelper.md +72 -0
  115. package/docs/reference/classes/JsonLdProcessor.md +9 -9
  116. package/docs/reference/interfaces/IJsonLdContextDefinition.md +4 -4
  117. package/docs/reference/interfaces/IJsonLdJsonObject.md +1 -1
  118. package/docs/reference/interfaces/IJsonLdLanguageMap.md +1 -1
  119. package/docs/reference/interfaces/IJsonLdNodeObject.md +1 -1
  120. package/package.json +6 -8
  121. package/dist/cjs/index.cjs +0 -2018
  122. package/dist/esm/index.mjs +0 -2012
@@ -0,0 +1,19 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.twindev.org/json-ld/JsonLdIndexMap",
4
+ "description": "An index map allows keys that have no semantic meaning, but should be preserved regardless, to be used in JSON-LD documents.",
5
+ "type": "object",
6
+ "additionalProperties": {
7
+ "anyOf": [
8
+ {
9
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIndexMapItem"
10
+ },
11
+ {
12
+ "type": "array",
13
+ "items": {
14
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIndexMapItem"
15
+ }
16
+ }
17
+ ]
18
+ }
19
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.twindev.org/json-ld/JsonLdIndexMapItem",
4
+ "description": "The items that can be stored in an index map.",
5
+ "anyOf": [
6
+ {
7
+ "type": "null"
8
+ },
9
+ {
10
+ "type": "boolean"
11
+ },
12
+ {
13
+ "type": "number"
14
+ },
15
+ {
16
+ "type": "string"
17
+ },
18
+ {
19
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
20
+ },
21
+ {
22
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdValueObject"
23
+ },
24
+ {
25
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdListObject"
26
+ },
27
+ {
28
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdSetObject"
29
+ }
30
+ ]
31
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.twindev.org/json-ld/JsonLdJsonArray",
4
+ "description": "JSON Type for array.",
5
+ "type": "array",
6
+ "items": {
7
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdJsonValue"
8
+ }
9
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.twindev.org/json-ld/JsonLdJsonObject",
4
+ "description": "JSON Type for object.",
5
+ "type": "object",
6
+ "additionalProperties": {
7
+ "anyOf": [
8
+ {
9
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdJsonValue"
10
+ },
11
+ {
12
+ "not": {}
13
+ }
14
+ ]
15
+ }
16
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.twindev.org/json-ld/JsonLdJsonPrimitive",
4
+ "description": "JSON Primitive.",
5
+ "type": [
6
+ "string",
7
+ "number",
8
+ "boolean",
9
+ "null"
10
+ ]
11
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.twindev.org/json-ld/JsonLdJsonValue",
4
+ "description": "JSON Value.",
5
+ "anyOf": [
6
+ {
7
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdJsonPrimitive"
8
+ },
9
+ {
10
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdJsonArray"
11
+ },
12
+ {
13
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdJsonObject"
14
+ }
15
+ ]
16
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.twindev.org/json-ld/JsonLdLanguageMap",
4
+ "description": "A language map is used to associate a language with a value in a way that allows easy programmatic access.",
5
+ "type": "object",
6
+ "additionalProperties": {
7
+ "anyOf": [
8
+ {
9
+ "type": "null"
10
+ },
11
+ {
12
+ "type": "string"
13
+ },
14
+ {
15
+ "type": "array",
16
+ "items": {
17
+ "type": "string"
18
+ }
19
+ }
20
+ ]
21
+ }
22
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.twindev.org/json-ld/JsonLdListObject",
4
+ "description": "A list represents an ordered set of values.",
5
+ "type": "object",
6
+ "properties": {
7
+ "@list": {
8
+ "anyOf": [
9
+ {
10
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdListOrSetItem"
11
+ },
12
+ {
13
+ "type": "array",
14
+ "items": {
15
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdListOrSetItem"
16
+ }
17
+ }
18
+ ]
19
+ },
20
+ "@index": {
21
+ "type": "string"
22
+ }
23
+ },
24
+ "required": [
25
+ "@list"
26
+ ],
27
+ "additionalProperties": false
28
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.twindev.org/json-ld/JsonLdListOrSetItem",
4
+ "description": "A list or set item can be a null, boolean, number, string, node object, or value object.",
5
+ "anyOf": [
6
+ {
7
+ "type": "null"
8
+ },
9
+ {
10
+ "type": "boolean"
11
+ },
12
+ {
13
+ "type": "number"
14
+ },
15
+ {
16
+ "type": "string"
17
+ },
18
+ {
19
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
20
+ },
21
+ {
22
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdValueObject"
23
+ }
24
+ ]
25
+ }
@@ -0,0 +1,100 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.twindev.org/json-ld/JsonLdNodeObject",
4
+ "description": "A node object represents zero or more properties of a node in the graph serialized by the JSON-LD document.",
5
+ "type": "object",
6
+ "additionalProperties": {
7
+ "anyOf": [
8
+ {
9
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
10
+ },
11
+ {
12
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
13
+ },
14
+ {
15
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIndexMap"
16
+ },
17
+ {
18
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
19
+ },
20
+ {
21
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIdMap"
22
+ },
23
+ {
24
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdTypeMap"
25
+ },
26
+ {
27
+ "type": "array"
28
+ }
29
+ ]
30
+ },
31
+ "properties": {
32
+ "@context": {
33
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionRoot"
34
+ },
35
+ "@id": {
36
+ "anyOf": [
37
+ {
38
+ "type": "string"
39
+ },
40
+ {
41
+ "type": "array",
42
+ "items": {
43
+ "type": "string"
44
+ }
45
+ }
46
+ ]
47
+ },
48
+ "@included": {
49
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
50
+ },
51
+ "@graph": {
52
+ "anyOf": [
53
+ {
54
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
55
+ },
56
+ {
57
+ "type": "array",
58
+ "items": {
59
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
60
+ }
61
+ }
62
+ ]
63
+ },
64
+ "@nest": {
65
+ "anyOf": [
66
+ {
67
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdJsonObject"
68
+ },
69
+ {
70
+ "type": "array",
71
+ "items": {
72
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdJsonObject"
73
+ }
74
+ }
75
+ ]
76
+ },
77
+ "@type": {
78
+ "anyOf": [
79
+ {
80
+ "type": "string"
81
+ },
82
+ {
83
+ "type": "array",
84
+ "items": {
85
+ "type": "string"
86
+ }
87
+ }
88
+ ]
89
+ },
90
+ "@reverse": {
91
+ "type": "object",
92
+ "additionalProperties": {
93
+ "type": "string"
94
+ }
95
+ },
96
+ "@index": {
97
+ "type": "string"
98
+ }
99
+ }
100
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive",
4
+ "description": "A node primitive is a JSON-LD value which is not one of the defined NodeObject properties.",
5
+ "anyOf": [
6
+ {
7
+ "type": "null"
8
+ },
9
+ {
10
+ "type": "boolean"
11
+ },
12
+ {
13
+ "type": "number"
14
+ },
15
+ {
16
+ "type": "string"
17
+ },
18
+ {
19
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
20
+ },
21
+ {
22
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdGraphObject"
23
+ },
24
+ {
25
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdValueObject"
26
+ },
27
+ {
28
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdListObject"
29
+ },
30
+ {
31
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdSetObject"
32
+ }
33
+ ]
34
+ }
@@ -0,0 +1,76 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.twindev.org/json-ld/JsonLdObject",
4
+ "description": "An object represents the pre-defined properties of the node object in the graph serialized by the JSON-LD document.",
5
+ "type": "object",
6
+ "properties": {
7
+ "@context": {
8
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionRoot"
9
+ },
10
+ "@id": {
11
+ "anyOf": [
12
+ {
13
+ "type": "string"
14
+ },
15
+ {
16
+ "type": "array",
17
+ "items": {
18
+ "type": "string"
19
+ }
20
+ }
21
+ ]
22
+ },
23
+ "@included": {
24
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
25
+ },
26
+ "@graph": {
27
+ "anyOf": [
28
+ {
29
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
30
+ },
31
+ {
32
+ "type": "array",
33
+ "items": {
34
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
35
+ }
36
+ }
37
+ ]
38
+ },
39
+ "@nest": {
40
+ "anyOf": [
41
+ {
42
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdJsonObject"
43
+ },
44
+ {
45
+ "type": "array",
46
+ "items": {
47
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdJsonObject"
48
+ }
49
+ }
50
+ ]
51
+ },
52
+ "@type": {
53
+ "anyOf": [
54
+ {
55
+ "type": "string"
56
+ },
57
+ {
58
+ "type": "array",
59
+ "items": {
60
+ "type": "string"
61
+ }
62
+ }
63
+ ]
64
+ },
65
+ "@reverse": {
66
+ "type": "object",
67
+ "additionalProperties": {
68
+ "type": "string"
69
+ }
70
+ },
71
+ "@index": {
72
+ "type": "string"
73
+ }
74
+ },
75
+ "additionalProperties": false
76
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.twindev.org/json-ld/JsonLdSetObject",
4
+ "description": "A set represents an unordered set of values.",
5
+ "type": "object",
6
+ "properties": {
7
+ "@set": {
8
+ "anyOf": [
9
+ {
10
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdListOrSetItem"
11
+ },
12
+ {
13
+ "type": "array",
14
+ "items": {
15
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdListOrSetItem"
16
+ }
17
+ }
18
+ ]
19
+ },
20
+ "@index": {
21
+ "type": "string"
22
+ }
23
+ },
24
+ "required": [
25
+ "@set"
26
+ ],
27
+ "additionalProperties": false
28
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.twindev.org/json-ld/JsonLdTypeMap",
4
+ "description": "A type map is used to associate an IRI with a value that allows easy programmatic access.",
5
+ "type": "object",
6
+ "additionalProperties": {
7
+ "anyOf": [
8
+ {
9
+ "type": "string"
10
+ },
11
+ {
12
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
13
+ }
14
+ ]
15
+ }
16
+ }
@@ -0,0 +1,113 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.twindev.org/json-ld/JsonLdValueObject",
4
+ "description": "A value object is used to explicitly associate a type or a language with a value to create a typed value or a language-tagged string and possibly associate a base direction.",
5
+ "anyOf": [
6
+ {
7
+ "type": "object",
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "@value": {
11
+ "type": [
12
+ "null",
13
+ "boolean",
14
+ "number",
15
+ "string"
16
+ ]
17
+ },
18
+ "@language": {
19
+ "type": "string"
20
+ },
21
+ "@direction": {
22
+ "type": [
23
+ "string",
24
+ "null"
25
+ ],
26
+ "enum": [
27
+ "ltr",
28
+ "rtl",
29
+ null
30
+ ]
31
+ },
32
+ "@index": {
33
+ "type": "string"
34
+ },
35
+ "@context": {
36
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionRoot"
37
+ }
38
+ },
39
+ "required": [
40
+ "@value"
41
+ ]
42
+ },
43
+ {
44
+ "type": "object",
45
+ "additionalProperties": false,
46
+ "properties": {
47
+ "@value": {
48
+ "type": [
49
+ "null",
50
+ "boolean",
51
+ "number",
52
+ "string"
53
+ ]
54
+ },
55
+ "@type": {
56
+ "type": "string"
57
+ },
58
+ "@index": {
59
+ "type": "string"
60
+ },
61
+ "@context": {
62
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionRoot"
63
+ }
64
+ },
65
+ "required": [
66
+ "@type",
67
+ "@value"
68
+ ]
69
+ },
70
+ {
71
+ "type": "object",
72
+ "additionalProperties": false,
73
+ "properties": {
74
+ "@value": {
75
+ "anyOf": [
76
+ {
77
+ "type": "null"
78
+ },
79
+ {
80
+ "type": "boolean"
81
+ },
82
+ {
83
+ "type": "number"
84
+ },
85
+ {
86
+ "type": "string"
87
+ },
88
+ {
89
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdJsonObject"
90
+ },
91
+ {
92
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdJsonArray"
93
+ }
94
+ ]
95
+ },
96
+ "@type": {
97
+ "type": "string",
98
+ "const": "@json"
99
+ },
100
+ "@index": {
101
+ "type": "string"
102
+ },
103
+ "@context": {
104
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionRoot"
105
+ }
106
+ },
107
+ "required": [
108
+ "@type",
109
+ "@value"
110
+ ]
111
+ }
112
+ ]
113
+ }