Thankyou Kpeo
I now understand that it is depend my application for json rpc or web
application.
Thanks for your response.
On Wed, Sep 30, 2015 at 1:08 PM, kpeo <sla...@ya...> wrote:
> Hi!
>
> It depends on your application and goals.
>
> The JSON-RPC server (asynchronous application) could be smoothly combined
> with synchronous application. See:
> http://permalink.gmane.org/gmane.comp.lib.cppcms.user/580
> http://cppcms.com/wikipp/en/page/cppcms_1x_json_rpc
> If you mean conversion from cppcms::json::value to string/stream/etc. -
> you can write something like
>
> std::string json_to_string(cppcms::json::value const& v)
> {
> std::ostringstream ss;
> if(!v.is_undefined())
> ss << v;
> return ss.str();
> }
>
> For json_rpc - you can just return the cppcms::json::value (i.e. "v"),
> like:
> return_result(v);
>
> Also you can look at examples/json_rpc_chat/chat.cpp and
> test/jsonrpc_test.cpp from CppCMS sources.
>
> Best regards,
> kpeo
>
> 30.09.2015, 06:18, "mawan sugiyanto" <ma...@gm...>:
>
> Dear All
>
> how to create json output ..
>
> I have an alternatives for json ouput .. create json value and then ouput
> to the response
> or any other best way to create json ouput?
>
> or it have to create rpc server, how if it combile with web application?
>
> thanks ..
>
> ,
>
>
> ------------------------------------------------------------------------------
> ,
>
> _______________________________________________
> Cppcms-users mailing list
> Cpp...@li...
> https://lists.sourceforge.net/lists/listinfo/cppcms-users
>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Cppcms-users mailing list
> Cpp...@li...
> https://lists.sourceforge.net/lists/listinfo/cppcms-users
>
>
|