SlimFast wrote:Just to let you know: I am working with wxCrafter as it is now several weeks and saying nothing means I didn't find any more major annoyances other those already said. I am looking forward to see AUI support - thats something I was missing personally.
It is already implemented along with long list of new controls ... I am at the final stage of releasing a new version (non BETA)
SlimFast wrote:Of course I thought about XML, but seeing all the JSON work in wxCrafter I wonder why you preferred JSON over XML. Is there a particular reason for it (more flexibility, easier API...) or is it a matter of taste? I am asking because I don't have strong experience with both: XML and JSON... well more with XML but none with JSON
Theses days, JSON is IN, XML is out (you can see how all the major companies like Google, Facebook etc have moved to use JSON for their WebAPI). Also, I find it more readable and taking less diskspace
For example, a list of string saved in JSON format will be kept like this:
While in XML you will need something like:
Code: Select all
<array><item>apple</item><item>apple</item><item>banana</item>
I created a very easy API based on cJSON (codelite is also slowly moving to JSON) which can be found here:
Code: Select all
https://sourceforge.net/apps/trac/codelite/browser/trunk/Plugin/json_node.cpp
here is an example of using this API:
Code: Select all
JSONRoot root(cJSON_Object); // Create a cJSON object root, there other forms of ctors that allow passing file name to parse or to create an array
root.toElement().addProperty("name", "my-name");
root.toElement().addProperty("last-name", "this is my last name");
printf("%s\n", toElement().format().mb_str(wxConvUTF8).data());
The output will be:
Code: Select all
{ "name" : "my-name", "last-name": "this is my last name" }
Also, it parses files *much* faster than wxWidgets XML classes
Eran