# `VulnCheck.Report.JSON`
[🔗](https://github.com/Voskan/vulncheck/blob/v1.0.1/lib/vulncheck/report/json.ex#L1)

Native JSON report (`--format json`, `schema_version` 1.0.0).

Keys are sorted and the output is pretty-printed with two spaces, so
rendering the same report always produces the same bytes. The document
is also accepted as a `--baseline`.

# `document`

```elixir
@spec document(VulnCheck.Types.ScanReport.t()) :: map()
```

The report as plain maps, lists and scalars.

# `encode`

```elixir
@spec encode(term(), non_neg_integer()) :: String.t()
```

Encodes a term with sorted object keys and two-space indentation.

    iex> VulnCheck.Report.JSON.encode(%{"b" => [1, %{}], "a" => nil})
    "{\n  \"a\": null,\n  \"b\": [\n    1,\n    {}\n  ]\n}"

---

*Consult [api-reference.md](api-reference.md) for complete listing*
