Formatter: Graph-info JSON

This section is aimed to show one example of the JSON format output when using any of these commands:

  • conan graph info xxxx --format=json

  • conan create xxxx --format=json

  • conan install xxxx --format=json

  • conan export-pkg xxxx --format=json

The output shows the graph information processed by Conan in each command.

Warning

This json output is experimental and subject to change.

The JSON output generated by conan graph info —require=zlib/1.2.11 -r=conancenter —format=json > graph.json for instance:

graph.json

  1. {
  2. "graph": {
  3. "nodes": {
  4. "0": {
  5. "ref": "conanfile",
  6. "id": "0",
  7. "recipe": "Cli",
  8. "package_id": null,
  9. "prev": null,
  10. "rrev": null,
  11. "rrev_timestamp": null,
  12. "prev_timestamp": null,
  13. "remote": null,
  14. "binary_remote": null,
  15. "build_id": null,
  16. "binary": null,
  17. "invalid_build": false,
  18. "info_invalid": null,
  19. "name": null,
  20. "user": null,
  21. "channel": null,
  22. "url": null,
  23. "license": null,
  24. "author": null,
  25. "description": null,
  26. "homepage": null,
  27. "build_policy": null,
  28. "upload_policy": null,
  29. "revision_mode": "hash",
  30. "provides": null,
  31. "deprecated": null,
  32. "win_bash": null,
  33. "win_bash_run": null,
  34. "default_options": null,
  35. "options_description": null,
  36. "version": null,
  37. "topics": null,
  38. "package_type": "unknown",
  39. "settings": {
  40. "os": "Macos",
  41. "arch": "x86_64",
  42. "compiler": "apple-clang",
  43. "compiler.cppstd": "gnu17",
  44. "compiler.libcxx": "libc++",
  45. "compiler.version": "12.0",
  46. "build_type": "Release"
  47. },
  48. "options": {},
  49. "options_definitions": {},
  50. "generators": [],
  51. "python_requires": null,
  52. "system_requires": {},
  53. "recipe_folder": null,
  54. "source_folder": null,
  55. "build_folder": null,
  56. "generators_folder": null,
  57. "package_folder": null,
  58. "cpp_info": {
  59. "root": {
  60. "includedirs": [
  61. "include"
  62. ],
  63. "srcdirs": null,
  64. "libdirs": [
  65. "lib"
  66. ],
  67. "resdirs": null,
  68. "bindirs": [
  69. "bin"
  70. ],
  71. "builddirs": null,
  72. "frameworkdirs": null,
  73. "system_libs": null,
  74. "frameworks": null,
  75. "libs": null,
  76. "defines": null,
  77. "cflags": null,
  78. "cxxflags": null,
  79. "sharedlinkflags": null,
  80. "exelinkflags": null,
  81. "objects": null,
  82. "sysroot": null,
  83. "requires": null,
  84. "properties": null
  85. }
  86. },
  87. "conf_info": {},
  88. "label": "cli",
  89. "dependencies": {
  90. "1": {
  91. "ref": "zlib/1.2.11",
  92. "run": false,
  93. "libs": true,
  94. "skip": false,
  95. "test": false,
  96. "force": false,
  97. "direct": true,
  98. "build": false,
  99. "transitive_headers": null,
  100. "transitive_libs": null,
  101. "headers": true,
  102. "package_id_mode": null,
  103. "visible": true
  104. }
  105. },
  106. "context": "host",
  107. "test": false
  108. },
  109. "1": {
  110. "ref": "zlib/1.2.11#ffa77daf83a57094149707928bdce823",
  111. "id": "1",
  112. "recipe": "Cache",
  113. "package_id": "d0599452a426a161e02a297c6e0c5070f99b4909",
  114. "prev": "1440f4f447208c8e6808936b4c6ff282",
  115. "rrev": "dc0e384f0551386cd76dc29cc964c95e",
  116. "rrev_timestamp": 1703667991.3458598,
  117. "prev_timestamp": 1703668372.8517942,
  118. "remote": null,
  119. "binary_remote": null,
  120. "build_id": null,
  121. "binary": "Missing",
  122. "invalid_build": false,
  123. "info_invalid": null,
  124. "name": "zlib",
  125. "user": null,
  126. "channel": null,
  127. "url": "https://github.com/conan-io/conan-center-index",
  128. "license": "Zlib",
  129. "author": null,
  130. "description": "A Massively Spiffy Yet Delicately Unobtrusive Compression Library (Also Free, Not to Mention Unencumbered by Patents)",
  131. "homepage": "https://zlib.net",
  132. "build_policy": null,
  133. "upload_policy": null,
  134. "revision_mode": "hash",
  135. "provides": null,
  136. "deprecated": null,
  137. "win_bash": null,
  138. "win_bash_run": null,
  139. "default_options": {
  140. "shared": false,
  141. "fPIC": true
  142. },
  143. "options_description": null,
  144. "version": "1.2.11",
  145. "topics": [
  146. "zlib",
  147. "compression"
  148. ],
  149. "package_type": "static-library",
  150. "settings": {
  151. "os": "Macos",
  152. "arch": "x86_64",
  153. "compiler": "apple-clang",
  154. "compiler.cppstd": "gnu17",
  155. "compiler.libcxx": "libc++",
  156. "compiler.version": "12.0",
  157. "build_type": "Release"
  158. },
  159. "options": {
  160. "fPIC": "True",
  161. "shared": "False"
  162. },
  163. "options_definitions": {
  164. "shared": [
  165. "True",
  166. "False"
  167. ],
  168. "fPIC": [
  169. "True",
  170. "False"
  171. ]
  172. },
  173. "generators": [],
  174. "python_requires": null,
  175. "system_requires": {},
  176. "recipe_folder": "/Users/franchuti/.conan2/p/zlib774aa77541f8b/e",
  177. "source_folder": null,
  178. "build_folder": null,
  179. "generators_folder": null,
  180. "package_folder": null,
  181. "cpp_info": {
  182. "root": {
  183. "includedirs": [
  184. "include"
  185. ],
  186. "srcdirs": null,
  187. "libdirs": [
  188. "lib"
  189. ],
  190. "resdirs": null,
  191. "bindirs": [
  192. "bin"
  193. ],
  194. "builddirs": null,
  195. "frameworkdirs": null,
  196. "system_libs": null,
  197. "frameworks": null,
  198. "libs": null,
  199. "defines": null,
  200. "cflags": null,
  201. "cxxflags": null,
  202. "sharedlinkflags": null,
  203. "exelinkflags": null,
  204. "objects": null,
  205. "sysroot": null,
  206. "requires": null,
  207. "properties": null
  208. }
  209. },
  210. "conf_info": {},
  211. "label": "zlib/1.2.11",
  212. "info": {
  213. "settings": {
  214. "os": "Macos",
  215. "arch": "x86_64",
  216. "compiler": "apple-clang",
  217. "compiler.cppstd": "gnu17",
  218. "compiler.libcxx": "libc++",
  219. "compiler.version": "12.0",
  220. "build_type": "Release"
  221. },
  222. "options": {
  223. "fPIC": "True",
  224. "shared": "False"
  225. }
  226. },
  227. "dependencies": {},
  228. "context": "host",
  229. "test": false
  230. }
  231. },
  232. "root": {
  233. "0": "None"
  234. },
  235. "overrides": {},
  236. "resolved_ranges": {},
  237. "replaced_requires": {}
  238. }
  239. }