CTAGS-JSON-OUTPUT - Online Linux Manual PageSection : 5
Updated :
Source : 1.0
Note : Universal Ctags

NAMEctags-json-output − JSON based ctags output

SYNOPSISctags −−output−format=json ...

DESCRIPTIONUniversal Ctags supports ­JSON (strictly speaking ­JSON Lines) output format if the ctags executable is built with libjansson​. JSON output goes to standard output by default.

FORMATEach JSON line represents a tag. $ ctags −−extras=+p −−output−format=json −−fields=−s input.py {"_type": "ptag", "name": "JSON_OUTPUT_VERSION", "path": "1.0", "pattern": "in development"} {"_type": "ptag", "name": "TAG_FILE_SORTED", "path": "1", "pattern": "0=unsorted, 1=sorted, 2=foldcase"} ​... {"_type": "tag", "name": "Klass", "path": "/tmp/input.py", "pattern": "/^class Klass:$/", "language": "Python", "kind": "class"} {"_type": "tag", "name": "method", "path": "/tmp/input.py", "pattern": "/^ def method(self):$/", "language": "Python", "kind": "member", "scope": "Klass", "scopeKind": "class"} ​... A key not starting with _ is mapped to a field of ctags. "−−output−format=json −−list−fields" options list the fields. A key starting with _ represents meta information of the JSON line. Currently only _type key is used. If the value for the key is tag, the JSON line represents a regular tag. If the value is ptag, the line represents a pseudo−tag. The output format can be changed in the future. JSON_OUTPUT_VERSION pseudo−tag provides a change client−tools to handle the changes. Current version is "1.0". A client−tool can extract the version with path key from the pseudo−tag. The JSON output format is newly designed and has no limitation found in the default tags file format. • The values for kind key are represented in long−name flags. No one−letter is here. • Scope names and scope kinds have distinguished keys: scope and scopeKind​. They are combined in the default tags file format.

DATA TYPE USED IN A FIELDValues for the most of all keys are represented in JSON string type. However, some of them are represented in string, integer, and/or boolean type. "−−output−format=json −−list−fields" options show What kind of data type used in a field of JSON. $ ctags −−output−format=json −−list−fields #LETTER NAME ENABLED LANGUAGE JSTYPE FIXED DESCRIPTION F input yes NONE s−− no input file ​... P pattern yes NONE s−b no pattern ​... f file yes NONE −−b no File−restricted scoping ​... e end no NONE −i− no end lines of various items ​... JSTYPE column shows the data types. 's'  string 'i'  integer 'b'  boolean (true or false) For an example, the value for pattern field of ctags takes a string or a boolean value.

VERSIONS

Change since 0.0 • New key kindName for TAG_ROLE_DESCRIPTION pseudo tag kindName is added to store the name of the kind in TAG_ROLE_DESCRIPTION pseudo tags. In 0.0, a "TAG_ROLE_DESCRIPTION" pseudo tag was printed like: {"_type": "ptag", "name": "TAG_ROLE_DESCRIPTION", "parserName": "LANG!KIND", } In 1.0, it is printed like: {"_type": "ptag", "name": "TAG_ROLE_DESCRIPTION", "parserName": "LANG", "kindName": "KIND", }

SEE ALSOctags(1), tags(5), ctags−client−tools(7)
0
Johanes Gumabo
Data Size   :   17,570 byte
man-ctags-json-output.5Build   :   2024-12-29, 07:25   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   3 / 259,071
Visitor ID   :     :  
Visitor IP   :   18.220.227.250   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.29
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.