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.
Top-level shape
Section titled “Top-level shape”{ "symbol_table": { "/absolute/path/to/File.java": { /* JavaCompilationUnit */ } }, "call_graph": [ /* edges — present only at analysis level 2 */ ], "version": "2.3.7"}| Key | Type | When present | Description |
|---|---|---|---|
symbol_table | object | always | Map of absolute file path → compilation unit. See Symbol table. |
call_graph | array | level 2 only | Caller→callee edges from WALA. See Call graph. |
version | string | always | The analyzer version that produced this document, e.g. "2.3.7". |
Serialization conventions
Section titled “Serialization conventions”The JSON is produced by Gson with a fixed configuration:
- Field naming:
LOWER_CASE_WITH_UNDERSCORES— Java fields likefilePathserialize asfile_path,callableDeclarationsascallable_declarations, and so on. - Nulls preserved:
serializeNullsis on, so absent values appear as explicitnullrather than being omitted. Consumers can rely on keys existing. - Pretty-printed, with HTML escaping disabled (so
<,>,&in code/strings stay literal).
Versioning and stability
Section titled “Versioning and stability”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.