Re: [Cppcms-users] Migration Guide
Brought to you by:
artyom-beilis
From: Artyom B. <art...@ya...> - 2012-03-04 21:09:58
|
> Yeah, I was also using CppCMS 1.x.x for some time now. > But I had some legacy code which needed to be ported to 1.x. > I am sure, however, I am not the only one in this situation, so I finished > the article: > http://cppcms.com/wikipp/en/page/cppcms_1x_migration > > CppCMS 1.x is vastly superior to 0.x - I realized that again during > porting ;) > Yes, I've began to write it but then left as I thought it was not really required as most of the users had already switched by now. > > I am not very fond of json as configuration format - even though it is very > good as data exchange format - because it lacks comments. Actually I was sure that it was mentioned in documentation (but I can't find it now) CppCMS json parser supports two extensions to the standard json syntax, that make it very easy to use for configuration: 1. C++ style comments i.e. "//" 2. It ignores trailing comma in objects and array definitions so stuff like that works. { "foo" : 10, "bar" : 20, // "baz" : 30 } It makes it very suitable as configuration file format. > What do you think > about a patch which let you switch to http://www.libelektra.org/ at > compiletime if preferred? > > Basically it would be just an alternative implementation of > json::value service::load_settings(int argc,char *argv[]) > > What do you think? > I'm not really fond of adding more 3rd party dependencies. What is the license libelektra distributed under? > >> I don't understand the question, you mean extra spaces when you press > on >> "view plain" ? > > Steps to reproduce: > Go to http://cppcms.com/wikipp/en/page/cppcms_1x_json with firefox/chrome > Select some text of a sourcecode, press ctrl+c and ctrl+v or middle mouse. > > I get: > my_object["name"]="Moshe"; > my_object["salary"]=1000.0; > (Note the two spaces at the end of each line) > > I expect: > No spaces at the end of lines. > > It seems to be some problem within the syntax highlighter, which generates > a "<span>; </span>" that adds these two spaces. It is a > little bit strange, > because the line numbers are suppressed successfully. > > Workaround: > Press "view plain" and copy there. > I assume that this is syntax highlighter bug (I hadn't written it, I just use it) > > Yeah, the decision to drop CgiCC is ok, cppcms is now more homogen and > easier to use. > Also CgiCC was quite buggy and limited :-) I don't miss it. > best regards > Markus Raab > Regards, Artyom |