Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sensible default for tuple #157

Open
menih opened this issue Nov 20, 2021 · 0 comments
Open

Sensible default for tuple #157

menih opened this issue Nov 20, 2021 · 0 comments

Comments

@menih
Copy link

menih commented Nov 20, 2021

Consider the following:
1> Tuple = {{key, value}, { key2, {key3, [value1, 2,3]}}}.
{{key,value},{key2,{key3,[value1,2,3]}}}
2> jsx:encode(Tuple).
** exception error: bad argument
in function jsx_parser:value/4 (jsx_parser.erl, line 163)

Can we come up with sensible default for portion which do not map nicely to json? Maybe just translate them to binary?

Or, allow a caller to a function (global and per invocation) to decide how to handle.

This is especially useful in logging and other situations where the term in question is unknown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant