matt-42 / silicon

A high performance, middleware oriented C++14 http web framework please use matt-42/lithium instead
http://siliconframework.org
MIT License
1.72k stars 138 forks source link

Cannot serialize the integer zero to json in response #37

Closed Kazuo256 closed 7 years ago

Kazuo256 commented 7 years ago

If a procedure tries to return a SIO object with fields that carry the value zero, they will appear as empty strings on the HTTP response body. For instance:

return D(_foo = 0);

Will be serialized to {"foo":}.

Is this the intended behaviour?

Edit: it seems the error is in the iod library. Should I close this?

fnc12 commented 7 years ago

Had the same issue. Changed serialization to nlohmann::json