# FIDL JSON intermediate representation

For all backends (except C), the FIDL compiler operates in two phases.
A first phase parses the FIDL file(s) and produces a JSON-based Intermediate
Representation (**IR**).
A second phase takes the IR as input, and produces the appropriate language-specific output.

The shape of the JSON IR is described in the [schema](https://cs.opensource.google/fuchsia/fuchsia/+/main:/tools/fidl/fidlc/schema.json). All JSON IR files that
are produced during compilation using `fx build` are validated using this schema.

If you are interested in the JSON IR, you can generate it by [running
the FIDL compiler](https://fuchsia.dev/docs/development/languages/fidl/guides/cli).
[](https://issues.fuchsia.dev/issues/new?component=1439230&template=1881640&description=Issue+on:+https://fuchsia.dev/docs/reference/fidl/language/json-ir.md "Report a bug or suggest improvements on this page") [](https://cs.opensource.google/fuchsia/fuchsia/+/main:docs/reference/fidl/language/json-ir.md "View the source code of this page") [](https://ci.android.com/edit?repo=fuchsia/fuchsia/main&file=docs/reference/fidl/language/json-ir.md&cloneRepo=fuchsia/fuchsia:refs/heads/main&fullPath=fuchsia/docs/reference/fidl/language/json-ir.md "Edit the source code of this page")