Hello,
I am playing a bit with http_listener and json and I get a resulting JSON that doesn't look right. The code is pretty simple:
```
web::json::value jVoices;
jVoices[L"voices"] = web::json::value::array();
request.reply(web::http::status_codes::OK, jVoices);
```
The output is:
{"voices":]}
it should be
{"voices":[]}
Is this a bug?
Thanks,
Pedro
Comments: Hi Pedro, We're in the process of releasing 2.0, so I've tried to reproduce your issue with the following code using the development branch of codeplex: ``` #include <iostream> #include "cpprest/json.h" int main() { web::json::value jVoices; jVoices[U("voices")] = web::json::value::array(); std::cout << jVoices.serialize() << std::endl; return 0; } ``` With this code, I get the expected output of `{"voices":[]}`. When the 2.0 release comes out, could you please retry your test? If you still get the same results, this could very well be a bug. Thanks, roschuma
I am playing a bit with http_listener and json and I get a resulting JSON that doesn't look right. The code is pretty simple:
```
web::json::value jVoices;
jVoices[L"voices"] = web::json::value::array();
request.reply(web::http::status_codes::OK, jVoices);
```
The output is:
{"voices":]}
it should be
{"voices":[]}
Is this a bug?
Thanks,
Pedro
Comments: Hi Pedro, We're in the process of releasing 2.0, so I've tried to reproduce your issue with the following code using the development branch of codeplex: ``` #include <iostream> #include "cpprest/json.h" int main() { web::json::value jVoices; jVoices[U("voices")] = web::json::value::array(); std::cout << jVoices.serialize() << std::endl; return 0; } ``` With this code, I get the expected output of `{"voices":[]}`. When the 2.0 release comes out, could you please retry your test? If you still get the same results, this could very well be a bug. Thanks, roschuma