JSON Writer¶
The JSON writer serializes headerkit IR into JSON, useful for inspection, debugging, inter-process communication, or as input to custom code generators.
Writer Class¶
JsonWriter
¶
Convenience Functions¶
header_to_json
¶
Convert a Header IR to a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
header
|
Header
|
Parsed header IR. |
required |
indent
|
int | None
|
JSON indentation level. None for compact output. |
2
|
Returns:
| Type | Description |
|---|---|
str
|
JSON string representing the header and all declarations. |