otp icon indicating copy to clipboard operation
otp copied to clipboard

json module format functions for key-value lists

Open isvilen opened this issue 1 year ago • 1 comments

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.

isvilen avatar Oct 02 '24 11:10 isvilen

A PR would increase the possibility of that to happen.

dgud avatar Oct 02 '24 11:10 dgud