Skip to content

Output schema overview

Every codeanalyzer-java run produces one document: analysis.json (or the same JSON on stdout). This page describes its top-level shape; the sub-pages cover each section in detail.

{
"symbol_table": {
"/absolute/path/to/File.java": { /* JavaCompilationUnit */ }
},
"call_graph": [ /* edges — present only at analysis level 2 */ ],
"version": "2.3.7"
}
KeyTypeWhen presentDescription
symbol_tableobjectalwaysMap of absolute file path → compilation unit. See Symbol table.
call_grapharraylevel 2 onlyCaller→callee edges from WALA. See Call graph.
versionstringalwaysThe analyzer version that produced this document, e.g. "2.3.7".

The JSON is produced by Gson with a fixed configuration:

  • Field naming: LOWER_CASE_WITH_UNDERSCORES — Java fields like filePath serialize as file_path, callableDeclarations as callable_declarations, and so on.
  • Nulls preserved: serializeNulls is on, so absent values appear as explicit null rather than being omitted. Consumers can rely on keys existing.
  • Pretty-printed, with HTML escaping disabled (so <, >, & in code/strings stay literal).

Each document carries a version. The schema is a contract: the CLDK Python SDK’s Pydantic models (JApplication, JType, JCallable, …) are locked to a compatible version, and your own consumers should treat the version field as the schema identifier.

When the schema changes incompatibly, the version bumps. One concrete example: imports changed from bare strings to structured objects ({ path, is_static, is_wildcard }) in 2.3.7. Tools reading an older analysis.json against newer code — or vice versa — should check the version. See the legacy import schema guard.