ClientUtils.DiagnosticsFormat (client_utils v0.1.18)

View Source

Serializes Mix.Task.Compiler.Diagnostic structs to JSON-compatible maps.

Summary

Functions

Encodes a list of diagnostics as JSONL (one JSON object per line).

Converts a diagnostic struct to a plain map suitable for JSON encoding.

Functions

to_jsonl(diagnostics)

@spec to_jsonl([Mix.Task.Compiler.Diagnostic.t()]) :: iodata()

Encodes a list of diagnostics as JSONL (one JSON object per line).

to_map(diagnostic)

@spec to_map(Mix.Task.Compiler.Diagnostic.t()) :: map()

Converts a diagnostic struct to a plain map suitable for JSON encoding.