::web::json::value odata_json_operation_payload_parameter_writer::serialize(std::vector<std::shared_ptr<odata_parameter>> parameters) { if (parameters.empty()) { return web::json::value(); } ::utility::stringstream_t ss; ss << U("{"); auto iter = parameters.cbegin(); handle_serialize_odata_parameter(ss, *iter, U('"'), U(':')); iter++; for(; iter != parameters.cend(); iter++) { ss << U(","); handle_serialize_odata_parameter(ss, *iter, U('"'), U(':')); } ss << U("}"); return web::json::value::parse(ss); }
::odata::utility::string_t odata_json_operation_url_parameter_writer::serialize(std::vector<std::shared_ptr<odata_parameter>> parameters) { if (parameters.empty()) { return U("()"); } ::odata::utility::stringstream_t ss; ss << U("("); auto iter = parameters.cbegin(); handle_serialize_odata_parameter(ss, *iter, U('\0'), U('=')); iter++; for(; iter != parameters.cend(); iter++) { ss << ","; handle_serialize_odata_parameter(ss, *iter, U('\0'), U('=')); } ss << U(")"); return ss.str(); }