diff --git a/docs/big-data-flink.md b/docs/big-data-flink.md index ba9294c..87a180e 100644 --- a/docs/big-data-flink.md +++ b/docs/big-data-flink.md @@ -325,6 +325,8 @@ curl -X GET \ #### Response: +> **Tip:** Use[jq](https://www.digitalocean.com/community/tutorials/how-to-transform-json-data-with-jq) to format the JSON responses in this tutorial + ```json [ { diff --git a/docs/big-data-spark.md b/docs/big-data-spark.md index 70dd8a3..4fc08b6 100644 --- a/docs/big-data-spark.md +++ b/docs/big-data-spark.md @@ -310,6 +310,8 @@ curl -X GET \ #### Response: +> **Tip:** Use[jq](https://www.digitalocean.com/community/tutorials/how-to-transform-json-data-with-jq) to format the JSON responses in this tutorial + ```json [ { diff --git a/docs/concise.md b/docs/concise.md index 00fd0bf..f04cd8b 100644 --- a/docs/concise.md +++ b/docs/concise.md @@ -470,6 +470,8 @@ curl -G -iX GET 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Temperatu #### Response: +> **Tip:** Use[jq](https://www.digitalocean.com/community/tutorials/how-to-transform-json-data-with-jq) to format the JSON responses in this tutorial + TemperatureSensor `urn:ngsi-ld:TemperatureSensor:001` is returned as _concise_ NGSI-LD. Additional metadata is returned because `options=sysAttrs`. By default the `@context` is returned in the payload body (although this could be moved due to content negotiation if the `Accept:application/json` had been set). The full response is shown below: diff --git a/docs/entity-relationships.md b/docs/entity-relationships.md index 69c7a61..f7e6901 100644 --- a/docs/entity-relationships.md +++ b/docs/entity-relationships.md @@ -232,6 +232,8 @@ curl -X GET 'http://localhost:1026/ngsi-ld/v1/entities/?type=TemperatureSensor,F #### Response: +> **Tip:** Use[jq](https://www.digitalocean.com/community/tutorials/how-to-transform-json-data-with-jq) to format the JSON responses in this tutorial + ```json [ { diff --git a/docs/identity-management.md b/docs/identity-management.md index 19a7b8a..bdce0a3 100644 --- a/docs/identity-management.md +++ b/docs/identity-management.md @@ -313,6 +313,8 @@ curl -iX POST \ #### Response: +> **Tip:** Use[jq](https://www.digitalocean.com/community/tutorials/how-to-transform-json-data-with-jq) to format the JSON responses in this tutorial + The response header returns an `X-Subject-token` which identifies who has logged on the application. This token is required in all subsequent requests to gain access. diff --git a/docs/index.md b/docs/index.md index 77f3b84..ddda8a2 100644 --- a/docs/index.md +++ b/docs/index.md @@ -121,6 +121,11 @@ the concept of a project object model (POM), Maven can manage a project's build, central piece of information. Maven can be used to define and download our dependencies and to build and package Java or Scala code into a JAR file. +### JQ + +[jq](https://jqlang.github.io/jq/) is a lightweight and flexible command-line JSON processor which can be used +to format the JSON responses received from the context broker and other FIWARE components. More information about how to use jq can be found [here](https://www.digitalocean.com/community/tutorials/how-to-transform-json-data-with-jq) + ## Data models The tutorials define a series of data-models to be used within the `@context`. More information about the classes and diff --git a/docs/iot-agent-json.md b/docs/iot-agent-json.md index 96831b8..20a9aab 100644 --- a/docs/iot-agent-json.md +++ b/docs/iot-agent-json.md @@ -613,6 +613,8 @@ curl -G -iX GET 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Device:te #### Response: +> **Tip:** Use[jq](https://www.digitalocean.com/community/tutorials/how-to-transform-json-data-with-jq) to format the JSON responses in this tutorial + ```json { "@context": "http://context/ngsi-context.jsonld", diff --git a/docs/iot-agent.md b/docs/iot-agent.md index c1ba415..b692d62 100644 --- a/docs/iot-agent.md +++ b/docs/iot-agent.md @@ -602,6 +602,8 @@ curl -G -iX GET 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Device:te #### Response: +> **Tip:** Use[jq](https://www.digitalocean.com/community/tutorials/how-to-transform-json-data-with-jq) to format the JSON responses in this tutorial + ```json { "@context": "http://context/ngsi-context.jsonld", diff --git a/docs/merge-patch.md b/docs/merge-patch.md index 304418d..4bfa818 100644 --- a/docs/merge-patch.md +++ b/docs/merge-patch.md @@ -329,6 +329,8 @@ the entities have changed after each operation. #### 5 Request: +> **Tip:** Use[jq](https://www.digitalocean.com/community/tutorials/how-to-transform-json-data-with-jq) to format the JSON responses in this tutorial + ```console curl -L -X GET \ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:City:001' \ diff --git a/docs/ngsi-ld-operations.md b/docs/ngsi-ld-operations.md index 84387f3..bd0cccc 100644 --- a/docs/ngsi-ld-operations.md +++ b/docs/ngsi-ld-operations.md @@ -413,6 +413,8 @@ curl -G -iX GET 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Temperatu #### Response: +> **Tip:** Use[jq](https://www.digitalocean.com/community/tutorials/how-to-transform-json-data-with-jq) to format the JSON responses in this tutorial + TemperatureSensor `urn:ngsi-ld:TemperatureSensor:001` is returned as _normalized_ NGSI-LD. Additional metadata is returned because `options=sysAttrs`. By default, the `@context` is returned in the payload body (although this could be moved due to content negotiation if the `Accept:application/json` had been set). The full response is shown below: diff --git a/docs/roles-permissions.md b/docs/roles-permissions.md index 40a02b0..defc80c 100644 --- a/docs/roles-permissions.md +++ b/docs/roles-permissions.md @@ -361,6 +361,8 @@ curl -iX POST \ #### Response: +> **Tip:** Use[jq](https://www.digitalocean.com/community/tutorials/how-to-transform-json-data-with-jq) to format the JSON responses in this tutorial + ```text HTTP/1.1 201 Created X-Subject-Token: d848eb12-889f-433b-9811-6a4fbf0b86ca diff --git a/docs/short-term-history.md b/docs/short-term-history.md index b741499..3d68f8c 100644 --- a/docs/short-term-history.md +++ b/docs/short-term-history.md @@ -218,6 +218,8 @@ curl -L -X GET \ #### Response: +> **Tip:** Use[jq](https://www.digitalocean.com/community/tutorials/how-to-transform-json-data-with-jq) to format the JSON responses in this tutorial + The response will look similar to the following: ```json diff --git a/docs/time-series-data.md b/docs/time-series-data.md index e587ca0..6486353 100644 --- a/docs/time-series-data.md +++ b/docs/time-series-data.md @@ -312,6 +312,8 @@ curl -X GET \ #### Response: +> **Tip:** Use[jq](https://www.digitalocean.com/community/tutorials/how-to-transform-json-data-with-jq) to format the JSON responses in this tutorial + ```json [ { diff --git a/docs/working-with-@context.md b/docs/working-with-@context.md index bfaffbb..7f7691c 100644 --- a/docs/working-with-@context.md +++ b/docs/working-with-@context.md @@ -258,6 +258,8 @@ curl -X GET \ #### Response: +> **Tip:** Use[jq](https://www.digitalocean.com/community/tutorials/how-to-transform-json-data-with-jq) to format the JSON responses in this tutorial + The response will look similar to the following: ```json