otp
otp copied to clipboard
json module format functions for key-value lists
Existing json:encode_key_value_list/2 and json:encode_key_value_list_checked/2 can be used to encode key-value lists while preserve their ordering.
It will be great if json module exports corresponding
-spec format_key_value_list([{term(), term()}], Encode::formatter(), State::map()) -> iodata().
and
-spec format_key_value_list_checked([{term(), term()}], Encode::formatter(), State::map()) -> iodata().
for generating formatted JSON from key-value lists.
A PR would increase the possibility of that to happen.