Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is JSON and is it better than xml etc
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012 R2
Network:
Windows Server 2012 R2
Database:
Visual FoxPro
Application:
Desktop
Virtual environment:
VMWare
Miscellaneous
Thread ID:
01665642
Message ID:
01665801
Views:
93
Thanks Rick...


>Yes there's one on VFPx and the West Wind Tools also have one.

Thanks: checked it out and tried some of the examples. Easy...thanks for building it in.

>For configuration JSON is not always great because it requires string encoding for special characters. Tabs, carriage returns/linefeeds and back slashes have to be encoded. It's easy to hand edit JSON and get it wrong because there's a character you forgot needed encoding. Some of this can be mitigated if you use a decent JSON editor (like VS Code) that provides syntax coloring.

Encoding was something I was wondering about because I knew I had to do some of that the last time I used your classes (wwhttp stuff). It seems though that your .Serialize() method does the encoding at least for CR/LF (I just checked).


> XmlToCursor and CursorAdapter are much faster than manually parsing XML or creating JSON/Parsing Json on the fly.

For the last project, for results returned from the server, most times I used XmlToCursor() for small results sets as it was fairly easy when using the switch to infer the structure from the cursor that I had already created, so did not have to get into using schemas.


>Personally I would probably opt for JSON just because it easily works with objects which is what I work with and XML doesn't make that natural. JSON is also the more 'modern' thing - but I guess we can take that with a grain of salt.

I want to be open to what this new developer might throw at me - if they are already using json a lot for other projects, I might as well learn it if it is the "new" thing - besides, if they have to write a bunch of stuff to give me xml, their rate is a whole lot higher than mine so it makes sense for me to adjust what I am doing than for them to run up their bill :-)

Albert
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform