Re: [Cppcms-users] Setting JSON at the root
Brought to you by:
artyom-beilis
|
From: Lee E. <le...@el...> - 2013-09-28 17:30:26
|
You can use any object that is convertible to json::value and if the primitives, vector and are not sufficient, you can always define json_traits class to convert whatever type you have to json::value and back On Thu, Sep 26, 2013 at 11:18 PM, Marcel Hellwig <ke...@co...> wrote: > On 26.09.2013 15:14, Abhishek wrote: > > Thanks for the clarification Marcel. > > > > And yeah, I mean ["Hello", "world", "value1", "value2"] , but mistakenly > > added curly brackets (braces). I meant array only. > > > > So lets say, if I use: > > > > cppcms::json::array is assigned std::vector<any_custom_object> > > > > , where "any_custom_objects" trait class has been defined with json > getters > > and setters, will give the desired json array (of any_custom_object or > > string, whatever used in vector)? > Sorry, but after the 10th read, I still don't get what you want ;) > What I can say to you: > * I don't know if cppcms parser support any other type than object as > root, I never tried > * for any other information see > http://cppcms.com/wikipp/en/page/cppcms_1x_json and the api at > http://cppcms.com/cppcms_ref/latest/namespacecppcms_1_1json.html > > If you have further question, please specify it. I'm sorry I'm not able > to help you atm. > > > > ------------------------------------------------------------------------------ > October Webinars: Code for Performance > Free Intel webinars can help you accelerate application performance. > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most > from > the latest Intel processors and coprocessors. See abstracts and register > > http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > |