about summary refs log tree commit diff
path: root/src/rt/rust_kernel.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-02-13 13:18:38 -0800
committerbors <bors@rust-lang.org>2013-02-13 13:18:38 -0800
commit5e6d7871c656145a5530b653882a3ce26f40c163 (patch)
treeb1e167790741751fe1823d39c5c36a3e08bafdf0 /src/rt/rust_kernel.cpp
parent7393fde763484ec504399667c1808dc8c5a3559f (diff)
parent9df11ae83f8bfc06bc9bd1dc2132e344bc1ed0c7 (diff)
downloadrust-5e6d7871c656145a5530b653882a3ce26f40c163.tar.gz
rust-5e6d7871c656145a5530b653882a3ce26f40c163.zip
auto merge of #4840 : jbclements/rust/add-json-enum-encoding, r=catamorphism
r?

I added code to the JSON encoder to support the serialization of enums.  Before this, the JSON serializer only handled Option, and encoded None as 'null'. Following this change, all enums are encoded as arrays containing the enum name followed by the encoded fields. This appears consistent with the unstated invariant that the resulting output can be mapped back to the input *if* there's a decoder around that knows the types that were in existence when the serialization occurred.

Also, added test cases.
Diffstat (limited to 'src/rt/rust_kernel.cpp')
0 files changed, 0 insertions, 0 deletions