-
Handle formatting improper lists
Improper lists can't be handled by standard iterators such as
Enum.map/2
, which made it impossible to convert them into a standard, loggable format. -
Check for implementation of
Jason.Encoder
for structsIf a struct has a custom implementation of
Jason.Encoder
we'll clean the internals but put everything back where we found it so the custom implementation could redact fields, for example.
-
Inspect non-atom/string keys
Instead of exploding on map keys in Jason if they were a list like
[:foo, "bar"]
or a map, etc., we'll allow strings or atoms as before, butinspect
otherwise.
-
Ensure full keyword list before encoding as map
This fixes situations where there are erlang-style option lists with both atoms and tuples, e.g.
[{Mod, []}, :enabled]
Initial release with a translator and formatter for structured JSON logs.