ubjson_ostream & operator << (json_type const & j) { pfs::error_code ec = write_json(j, true); if (ec) PFS_THROW(json_exception(ec)); return *this; }
pfs::byte_string to_ubjson (JsonType const & j, int flags) { pfs::error_code ec; pfs::byte_string r = to_ubjson<JsonType>(j, flags, ec); if (ec) PFS_THROW(json_exception(ec)); return r; }
void json_value::parseBool(std::stringstream &input) { if(json::match(input, "true")) { m_bool = true; } else if(json::match(input, "false")) { m_bool = false; } else { throw json_exception(); } }