postgrespro.git / summary / log / commit / refs

commit    6c3ef7482f2bdedc68146a4ffcba4b8b241b91a9
Author:   Peter Eisentraut <peter@eisentraut.org>
Date:     Thu Sep 26 19:27:34 2019 +0000

    doc: Format example JSON data better


doc/src/sgml/func.sgml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index cc3041f637..5b2c87705e 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -12916,17 +12916,20 @@ table2-mapping For example, suppose you have some JSON data from a GPS tracker that you would like to parse, such as: <programlisting> -{ "track" : - { - "segments" : [ - { "location": [ 47.763, 13.4034 ], +{ + "track": { + "segments": [ + { + "location": [ 47.763, 13.4034 ], "start time": "2018-10-14 10:05:14", "HR": 73 }, - { "location": [ 47.706, 13.2635 ], + { + "location": [ 47.706, 13.2635 ], "start time": "2018-10-14 10:39:21", "HR": 135 - } ] + } + ] } } </programlisting> [parent: a4a5c0cf9cec]