File: doctree.rst

package info (click to toggle)
liborcus 0.20.1-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 16,644 kB
  • sloc: xml: 78,349; cpp: 74,365; sh: 4,626; makefile: 2,787; python: 2,614
file content (21 lines) | stat: -rw-r--r-- 524 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

Populating a document tree from JSON string
===========================================

The following code snippet shows an example of how to populate an instance of
:cpp:class:`~orcus::json::document_tree` from a JSON string, and navigate its
content tree afterward.

.. literalinclude:: ../../../doc_example/json_doc_1.cpp
   :language: C++

You'll see the following output when executing this code:

.. code-block:: text

    name: John Doe
    occupation: Software Engineer
    score:
      - 89
      - 67
      - 90