componentsjs 6.2.0 → 6.3.0
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.
|
@@ -95,6 +95,23 @@ class ParameterPropertyHandlerRange {
|
|
|
95
95
|
// Check if the param type is an array
|
|
96
96
|
if (value && type.isA('ParameterRangeArray')) {
|
|
97
97
|
if (!value.list) {
|
|
98
|
+
// If the value is a JSON literal, try to interpret as an array
|
|
99
|
+
if (value.term.termType === 'Literal' && value.term.datatype.value === Iris_1.IRIS_RDF.JSON) {
|
|
100
|
+
const jsonString = value.value;
|
|
101
|
+
if (jsonString.startsWith('[') && jsonString.endsWith(']')) {
|
|
102
|
+
try {
|
|
103
|
+
const parsed = JSON.parse(value.value);
|
|
104
|
+
value.term.valueRaw = parsed;
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
catch (error) {
|
|
108
|
+
return {
|
|
109
|
+
description: `JSON parse exception: ${error.message}`,
|
|
110
|
+
context: errorContext,
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
98
115
|
return {
|
|
99
116
|
description: `value is not an RDF list`,
|
|
100
117
|
context: errorContext,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "componentsjs",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.3.0",
|
|
4
4
|
"description": "A semantic dependency injection framework",
|
|
5
5
|
"lsd:contexts": {
|
|
6
6
|
"https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^5.0.0/components/context.jsonld": "components/context.jsonld"
|