```{eval-rst} .. index:: .ls file NAR listing binary cache; NAR listing ``` # NAR Listings NAR listing resources describe the structure of a {term}`NAR` file. NAR listing resources **SHOULD** use the media type `application/json`. The document **MUST** be in {rfc}`JSON format <8259>` and **MUST** conform to the [NAR listing schema](schema/nar-listing.json). (This structure is the same as Nix's `.ls` files.) Each filesystem object is represented as a JSON object with a `type` property. - Regular files are `"type": "regular"`. Such objects have `executable`, `size`, and `narOffset` properties. - Directories are `"type": "directory"`. Such objects have an `entries` property that is an object that maps names to other filesystem objects. - Symbolic links (symlinks) are `"type": "symlink"`. Such objects have a `target` property. A listing document is a JSON object with a `"version": 1` property and a `root` property with a filesystem object value. :::{rubric} JSON Schema :heading-level: 2 ::: ```{literalinclude} schema/nar-listing.json :language: json ```