diff options
-rw-r--r-- | project2/json/serialize.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/project2/json/serialize.cpp b/project2/json/serialize.cpp index 600d93d..ff2d778 100644 --- a/project2/json/serialize.cpp +++ b/project2/json/serialize.cpp @@ -31,6 +31,8 @@ namespace json { }; void serializeObject(const Object & o, std::ostream & s) { + s << std::boolalpha; + s << std::fixed; s << '{'; BOOST_FOREACH(const Object::value_type & v, o) { if (&v != &*o.begin()) { @@ -110,12 +112,7 @@ namespace json { } void serializeBoolean(const Boolean & b, std::ostream & s) { - if (b) { - s << "true"; - } - else { - s << "false"; - } + s << b; } void serializeNull(const Null &, std::ostream & s) { |