You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-17Lines changed: 17 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,7 +67,7 @@ We represent the example as a full Node-RED message, i.e. wrapped into a `{"payl
67
67
68
68
### Example of configuration file listing the JSON schemas
69
69
70
-
In the example, this JSON file is hosted at [`examples/smart-data-models.json`](https://raw.githubusercontent.com/alexandrainst/node-red-contrib-json-multi-schema/master/examples/smart-data-models.json)
70
+
In the example, this JSON file is hosted at [`examples/smart-data-models.json`](https://raw.githubusercontent.com/alexandrainst/node-red-contrib-json-multi-schema/main/examples/smart-data-models.json)
71
71
72
72
`query` is a [JSONata expression](http://docs.jsonata.org/simple). In this example, it will match the input data above on `"type":"Vehicle"`
73
73
@@ -95,7 +95,7 @@ In the example, this JSON file is hosted at [`examples/smart-data-models.json`](
95
95
### Example of configuration file listing the JSONata transformations
96
96
97
97
Same format than above.
98
-
In the example, this JSON file is hosted at [`examples/smart-data-transforms.json`](https://raw.githubusercontent.com/alexandrainst/node-red-contrib-json-multi-schema/master/examples/smart-data-transforms.json)
98
+
In the example, this JSON file is hosted at [`examples/smart-data-transforms.json`](https://raw.githubusercontent.com/alexandrainst/node-red-contrib-json-multi-schema/main/examples/smart-data-transforms.json)
99
99
100
100
`query` is a [JSONata expression](http://docs.jsonata.org/simple).
101
101
@@ -105,14 +105,14 @@ In the example, this JSON file is hosted at [`examples/smart-data-transforms.jso
105
105
"description": "Transformation from NGSI v2 models from 'Normalized response representation' to 'Simplified representation'",
@@ -212,7 +212,7 @@ We represent the example as a full Node-RED message, i.e. wrapped into a `{"payl
212
212
213
213
### Example of JSONata transformation
214
214
215
-
In the example, this JSONata file is hosted at [`Cesva-TA120-to-NoiseLevelObserved.jsonata.js`](https://raw.githubusercontent.com/alexandrainst/node-red-contrib-json-multi-schema/master/examples/Cesva-TA120-to-NoiseLevelObserved.jsonata.js).
215
+
In the example, this JSONata file is hosted at [`Cesva-TA120-to-NoiseLevelObserved.jsonata.js`](https://raw.githubusercontent.com/alexandrainst/node-red-contrib-json-multi-schema/main/examples/Cesva-TA120-to-NoiseLevelObserved.jsonata.js).
216
216
217
217
```js
218
218
{
@@ -226,14 +226,14 @@ In the example, this JSONata file is hosted at [`Cesva-TA120-to-NoiseLevelObserv
226
226
227
227
```
228
228
229
-
A more advanced example of JSONata transformation can be found in [`NGSI-Normalised-to-keyValues.jsonata.js`](https://raw.githubusercontent.com/alexandrainst/node-red-contrib-json-multi-schema/master/examples/NGSI-Normalised-to-keyValues.jsonata.js).
229
+
A more advanced example of JSONata transformation can be found in [`NGSI-Normalised-to-keyValues.jsonata.js`](https://raw.githubusercontent.com/alexandrainst/node-red-contrib-json-multi-schema/main/examples/NGSI-Normalised-to-keyValues.jsonata.js).
230
230
231
231
### Example of transformation from command line
232
232
233
233
The JSON input messages must each be on one single line, and wrapped into a Node-RED structure `{"payload":...}`
Copy file name to clipboardExpand all lines: examples/Node-RED_example_of_HTTP_flow.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -57,7 +57,7 @@
57
57
"fieldType": "msg",
58
58
"format": "json",
59
59
"syntax": "plain",
60
-
"template": "[\n\t{\n\t\t\"description\": \"Transformation from NGSI v2 models from 'Normalized response representation' (JSON-LD version partially supported) to 'Simplified representation'\",\n\t\t\"query\": \"type and *.value\",\n\t\t\"cases\": {\n\t\t\t\"true\": \"http://localhost:1880/schemas/NGSI-Normalised-to-keyValues.jsonata.js\"\n\t\t}\n\t},\n\t{\n\t\t\"description\": \"Transformation from Cesva-TA120 to NGSI v2 NoiseLevelObserved in Simplified representation\",\n\t\t\"query\": \"type='Cesva-TA120' and NoiseLevelObserved\",\n\t\t\"cases\": {\n\t\t\t\"true\": \"https://raw.githubusercontent.com/alexandrainst/node-red-contrib-json-multi-schema/master/examples/Cesva-TA120-to-NoiseLevelObserved.jsonata.js\"\n\t\t}\n\t}\n]\n",
60
+
"template": "[\n\t{\n\t\t\"description\": \"Transformation from NGSI v2 models from 'Normalized response representation' (JSON-LD version partially supported) to 'Simplified representation'\",\n\t\t\"query\": \"type and *.value\",\n\t\t\"cases\": {\n\t\t\t\"true\": \"http://localhost:1880/schemas/NGSI-Normalised-to-keyValues.jsonata.js\"\n\t\t}\n\t},\n\t{\n\t\t\"description\": \"Transformation from Cesva-TA120 to NGSI v2 NoiseLevelObserved in Simplified representation\",\n\t\t\"query\": \"type='Cesva-TA120' and NoiseLevelObserved\",\n\t\t\"cases\": {\n\t\t\t\"true\": \"https://raw.githubusercontent.com/alexandrainst/node-red-contrib-json-multi-schema/main/examples/Cesva-TA120-to-NoiseLevelObserved.jsonata.js\"\n\t\t}\n\t}\n]\n",
Copy file name to clipboardExpand all lines: examples/smart-data-transforms.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -3,14 +3,14 @@
3
3
"description": "Transformation from NGSI v2 models from 'Normalized response representation' (JSON-LD version partially supported) to 'Simplified representation'",
0 commit comments