Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is JSON and is it better than xml etc
Message
From
22/01/2019 22:42:02
 
 
To
22/01/2019 14:42:25
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:
01665658
Views:
86
Hi Albert,

We use csv-s (yep, the good old ones...) and both xml and json resources in our applications. Aside with dbfs of course... Here is my take on JSON usage within VFP.

1) are their json parsers out there for VFP or would I have to write my own; with xml, there were the built in xml functions which I used
Yep, we use Marco Plaza library and we like it!

2) does json have any advantages over xml?
They do not belong to the same league. We use xml for highly complex resources. Took us a LOT of time. We think of it as an alternative to crafting a proprietary format with all the complexities that it entails. XML is indeed complex and parsers CPU intensive. But building and maintaining your own stuff is way worse IMHO.

I would definitely not oppose them. Quite the opposite indeed. In terms of http-based applications, their use is plain obvious. In workstation-centric applications, json files are also a great alternative to ini files....

3) any "gotchas" to watch out for?
I cannot remember them really. that's pretty simple. We have subclassed marco jnjson classes a couple of months ago - yep dates are a bit of a problem since there 's no date format but that's indeed easy to circumvent - and off you go:-)

json, a no-brainer! There aren't so many in our jobs:-)
Daniel
Previous
Reply
Map
View

Click here to load this message in the networking platform