[erlang-questions] json_to_term EEP
Tony Garnock-Jones
tonyg@REDACTED
Wed Jul 30 21:44:50 CEST 2008
Anthony Shipman wrote:
> How about
> {json, [ {...} ] }
> so that we know what we are looking at and can check it in function argument
> patterns etc.
rfc4627.erl uses {obj, [{Key, Value}, ...]}.
Personally, I'm in favour of the uniform option {[{Key, Value}, ...]},
with the empty object being {[]}. It permits uniform treatment of the
list of key-value pairs without a gratuitous special case. I find myself
reading it as if JSON objects are delimited by a new kind of brackets,
"{[" and "]}".
Tony
More information about the erlang-questions
mailing list