@@ -470,81 +470,7 @@ nearest occurrence from the line" gives good result on both schemes.
470470
471471JSON OUTPUT
472472-----------
473- Universal Ctags supports `JSON <https://www.json.org/ >`_ (strictly
474- speaking `JSON Lines <https://jsonlines.org/ >`_) output format if the
475- ctags executable is built with ``libjansson ``. JSON output goes to
476- standard output by default.
477-
478- Format
479- ~~~~~~
480- Each JSON line represents a tag.
481-
482- .. code-block :: console
483-
484- $ ctags --extras=+p --output-format=json --fields=-s input.py
485- {"_type": "ptag", "name": "JSON_OUTPUT_VERSION", "path": "0.0", "pattern": "in development"}
486- {"_type": "ptag", "name": "TAG_FILE_SORTED", "path": "1", "pattern": "0=unsorted, 1=sorted, 2=foldcase"}
487- ...
488- {"_type": "tag", "name": "Klass", "path": "/tmp/input.py", "pattern": "/^class Klass:$/", "language": "Python", "kind": "class"}
489- {"_type": "tag", "name": "method", "path": "/tmp/input.py", "pattern": "/^ def method(self):$/", "language": "Python", "kind": "member", "scope": "Klass", "scopeKind": "class"}
490- ...
491-
492- A key not starting with ``_ `` is mapped to a field of ctags.
493- "``--output-format=json --list-fields ``" options list the fields.
494-
495- A key starting with ``_ `` represents meta information of the JSON
496- line. Currently only ``_type `` key is used. If the value for the key
497- is ``tag ``, the JSON line represents a regular tag. If the value is
498- ``ptag ``, the line represents a pseudo-tag.
499-
500- The output format can be changed in the
501- future. ``JSON_OUTPUT_VERSION `` pseudo-tag provides a change
502- client-tools to handle the changes. Current version is "0.0". A
503- client-tool can extract the version with ``path `` key from the
504- pseudo-tag.
505-
506- The JSON output format is newly designed and has no limitation found
507- in the default tags file format.
508-
509- * The values for ``kind `` key are represented in long-name flags.
510- No one-letter is here.
511-
512- * Scope names and scope kinds have distinguished keys: ``scope `` and ``scopeKind ``.
513- They are combined in the default tags file format.
514-
515- Data type used in a field
516- ~~~~~~~~~~~~~~~~~~~~~~~~~
517- Values for the most of all keys are represented in JSON string type.
518- However, some of them are represented in string, integer, and/or boolean type.
519-
520- "``--output-format=json --list-fields ``" options show What kind of data type
521- used in a field of JSON.
522-
523- .. code-block :: console
524-
525- $ ctags --output-format=json --list-fields
526- #LETTER NAME ENABLED LANGUAGE JSTYPE FIXED DESCRIPTION
527- F input yes NONE s-- no input file
528- ...
529- P pattern yes NONE s-b no pattern
530- ...
531- f file yes NONE --b no File-restricted scoping
532- ...
533- e end no NONE -i- no end lines of various items
534- ...
535-
536- ``JSTYPE `` column shows the data types.
537-
538- '``s ``'
539- string
540-
541- '``i ``'
542- integer
543-
544- '``b ``'
545- boolean (true or false)
546-
547- For an example, the value for ``pattern `` field of ctags takes a string or a boolean value.
473+ See :ref: `ctags-json-output(5) <ctags-json-output(5) >`.
548474
549475CHANGES
550476-----------
@@ -555,4 +481,4 @@ Version 6.0
555481
556482SEE ALSO
557483--------
558- :ref: `ctags(1) <ctags(1) >`, :ref: `ctags-lang-python(7) <ctags-lang-python(7) >`, :ref: `ctags-incompatibilities(7) <ctags-incompatibilities(7) >`, :ref: `tags(5) <tags(5) >`, :ref: `readtags(1) <readtags(1) >`
484+ :ref: `ctags(1) <ctags(1) >`, :ref: `ctags-lang-python(7) <ctags-lang-python(7) >`, :ref: `ctags-incompatibilities(7) <ctags-incompatibilities(7) >`, :ref: `tags(5) <tags(5) >`, :ref: `ctags-json-output(5) < ctags-json-output(5) >`, :ref: ` readtags(1) <readtags(1) >`
0 commit comments