doc: markup JSON as any role (part II)
Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
This commit is contained in:
@@ -243,15 +243,15 @@ Modify JSON by Using Shell Commands
|
||||
|
||||
.. note::
|
||||
|
||||
Nowadays Web services are JSON-based, so making your script JSON aware is
|
||||
probably a good choice. In order to be able to extract data from a JSON
|
||||
document as well as composing JSON documents from a script, you can leverage
|
||||
Nowadays Web services are :any:`JSON`-based, so making your script :any:`JSON` aware is
|
||||
probably a good choice. In order to be able to extract data from a :any:`JSON`
|
||||
document as well as composing :any:`JSON` documents from a script, you can leverage
|
||||
`jq <https://https://stedolan.github.io/jq/>`_.
|
||||
|
||||
|
||||
**Example #1**
|
||||
|
||||
In this example our *Kapow!* service will receive a JSON value with an incorrect
|
||||
In this example our *Kapow!* service will receive a :any:`JSON` value with an incorrect
|
||||
date, then our ``pow`` file will fix it and return the correct value to the user.
|
||||
|
||||
.. code-block:: console
|
||||
@@ -276,8 +276,8 @@ Call the service with :program:`curl`:
|
||||
|
||||
**Example #2**
|
||||
|
||||
In this example we extract the ``name`` field from the incoming JSON document in
|
||||
order to generate a two-attribute JSON response.
|
||||
In this example we extract the ``name`` field from the incoming :any:`JSON` document in
|
||||
order to generate a two-attribute :any:`JSON` response.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
|
||||
Reference in New Issue
Block a user