Encodes diagnostic reports as JSON using Jason.
Reports produced by TraceGuard.TraceBuilder contain only strings,
numbers, booleans, nil, lists and string-keyed maps, and are redacted
before they reach the exporter. Encoding therefore never needs custom
Jason.Encoder implementations.
Summary
Functions
@spec encode(map(), keyword()) :: {:ok, String.t()} | {:error, Exception.t()}
Encodes a report.
Options
:pretty- pretty-print the output (defaultfalse)
Encodes a report and writes it to path.