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.
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.