>Hi all,
>
>In discussion with another developer about re-doing a system. This system interacted with a document database and the integration with the VFP app was done with calls that always returned an xml string. The other developer had mentioned using json to return back data from the server.
>
>I have done the wikipedia lookup and have an idea what json data looks like but have some questions:
>
>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
Yes and you can get them from VfpX. I was using two of them in the last couple of years and had very few problems.
>2) does json have any advantages over xml?
Much shorter, no header with definition, no frills, no extra attributes, one standard and not messed up by Microsoft. Therefore parsers are faster and simpler and you can actually use those written in Fox, without any COM (and, believe it or not, the COM parser may complain about empty url being insecure :facepalm:, which json parser doesn't even care of). You can easily check the validity of your json on
http://jsonlint.com.
>3) any "gotchas" to watch out for?
There are at least two ways to write a date - as a date() function with parameters, or as a date string - and when a string, there may be some gotchas about the format... Read about that, I forgot what the issue was, I got mine working and don't remember what exactly the problem was, not to mention what the solution was. It's when you try three things, one works, you don't necessarily memorize which.