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
{
  "graph": {
      "nodes": {
            "0": {
                "ref": "conanfile",
                "id": "0",
                "recipe": "Cli",
                "package_id": null,
                "prev": null,
                "build_id": null,
                "binary": null,
                "invalid_build": false,
                "info_invalid": null,
                "name": null,
                "user": null,
                "channel": null,
                "url": null,
                "license": null,
                "author": null,
                "description": null,
                "homepage": null,
                "build_policy": null,
                "upload_policy": null,
                "revision_mode": "hash",
                "provides": null,
                "deprecated": null,
                "win_bash": null,
                "win_bash_run": null,
                "default_options": null,
                "options_description": null,
                "version": null,
                "topics": null,
                "package_type": "unknown",
                "settings": {
                    "os": "Macos",
                    "arch": "x86_64",
                    "compiler": "apple-clang",
                    "compiler.cppstd": "gnu17",
                    "compiler.libcxx": "libc++",
                    "compiler.version": "12.0",
                    "build_type": "Release"
                },
                "options": {},
                "options_definitions": {},
                "generators": [],
                "system_requires": {},
                "recipe_folder": null,
                "source_folder": null,
                "build_folder": null,
                "generators_folder": null,
                "package_folder": null,
                "cpp_info": {
                    "root": {
                        "includedirs": [
                            "include"
                        ],
                        "srcdirs": null,
                        "libdirs": [
                            "lib"
                        ],
                        "resdirs": null,
                        "bindirs": [
                            "bin"
                        ],
                        "builddirs": null,
                        "frameworkdirs": null,
                        "system_libs": null,
                        "frameworks": null,
                        "libs": null,
                        "defines": null,
                        "cflags": null,
                        "cxxflags": null,
                        "sharedlinkflags": null,
                        "exelinkflags": null,
                        "objects": null,
                        "sysroot": null,
                        "requires": null,
                        "properties": null
                    }
                },
                "label": "cli",
                "dependencies": {
                    "1": {
                        "ref": "zlib/1.2.11",
                        "run": false,
                        "libs": true,
                        "skip": false,
                        "test": false,
                        "force": false,
                        "direct": true,
                        "build": false,
                        "transitive_headers": null,
                        "transitive_libs": null,
                        "headers": true,
                        "package_id_mode": null,
                        "visible": true
                    }
                },
                "context": "host",
                "test": false
            },
            "1": {
                "ref": "zlib/1.2.11#ffa77daf83a57094149707928bdce823",
                "id": "1",
                "recipe": "Cache",
                "package_id": "d0599452a426a161e02a297c6e0c5070f99b4909",
                "prev": null,
                "build_id": null,
                "binary": "Missing",
                "invalid_build": false,
                "info_invalid": null,
                "name": "zlib",
                "user": null,
                "channel": null,
                "url": "https://github.com/conan-io/conan-center-index",
                "license": "Zlib",
                "author": null,
                "description": "A Massively Spiffy Yet Delicately Unobtrusive Compression Library (Also Free, Not to Mention Unencumbered by Patents)",
                "homepage": "https://zlib.net",
                "build_policy": null,
                "upload_policy": null,
                "revision_mode": "hash",
                "provides": null,
                "deprecated": null,
                "win_bash": null,
                "win_bash_run": null,
                "default_options": {
                    "shared": false,
                    "fPIC": true
                },
                "options_description": null,
                "version": "1.2.11",
                "topics": [
                    "zlib",
                    "compression"
                ],
                "package_type": "static-library",
                "settings": {
                    "os": "Macos",
                    "arch": "x86_64",
                    "compiler": "apple-clang",
                    "compiler.version": "12.0",
                    "build_type": "Release"
                },
                "options": {
                    "fPIC": "True",
                    "shared": "False"
                },
                "options_definitions": {
                    "shared": [
                        "True",
                        "False"
                    ],
                    "fPIC": [
                        "True",
                        "False"
                    ]
                },
                "generators": [],
                "system_requires": {},
                "recipe_folder": "/Users/franchuti/.conan2/p/zlib774aa77541f8b/e",
                "source_folder": null,
                "build_folder": null,
                "generators_folder": null,
                "package_folder": null,
                "cpp_info": {
                    "root": {
                        "includedirs": [
                            "include"
                        ],
                        "srcdirs": null,
                        "libdirs": [
                            "lib"
                        ],
                        "resdirs": null,
                        "bindirs": [
                            "bin"
                        ],
                        "builddirs": null,
                        "frameworkdirs": null,
                        "system_libs": null,
                        "frameworks": null,
                        "libs": null,
                        "defines": null,
                        "cflags": null,
                        "cxxflags": null,
                        "sharedlinkflags": null,
                        "exelinkflags": null,
                        "objects": null,
                        "sysroot": null,
                        "requires": null,
                        "properties": null
                    }
                },
                "label": "zlib/1.2.11",
                "dependencies": {},
                "context": "host",
                "test": false
            }
        },
        "root": {
            "0": "None"
        },
        "overrides": {},
        "resolved_ranges": {}
    }
}