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:
01666196
Views:
77
>>JSON has its place in data processing and interchange. XML is more people-friendly.
>
> ... XML can be very flexible I don't disagree, but the more flexible the more complex usually. If we're talking about single level schemas like VFP cursors run to XML or a configuration file with settings - yeah that's simple enough that you likely won't run into schema conflicts or type issues. But if you're using XML for data transfer across differing system the story is very, very different.

I agree. For any kind of inter-process data interchange, especially if those processes are on separate systems, JSON would be my choice (apart from a fixed protocol dedicated to a particular task, which may be preferable for performance reasons and depends upon need). But for generic data conveyance, such as data as a payload for the user primarily, and not for a computer to process and consume ... I would go with XML.

>I have worked probably with thousands of SOAP/WS* services over the years and 90% of the pain that I've dealt with is related to the way that the XML data is translated back into data structures or just how that data is to be interpreted.Trying to fill XML data based on a complex schema only is very very difficult and if you say otherwise I'd argue you've never dealt with complex XML documents that contain even just 50 or more objects.

I've used SOAP a handful of times over the years. I've found maintaining a WSDL and the translation it goes through is more complex than writing custom code to handle the data interchange. As such, I've written my own XML parsers, and the associated queries I needed from them. It's never been an issue, but I also don't use standard tools. I'm not trying to merely get things to work, but have been in the designing business (designing my own tools to do many things).

>This is why I prefer JSON for data transfer tasks. While it's not as human friendly to enter data due to encoding requirements, it's much easier to reason out what the data encoded in it means because there are only four base types (number, string, boolean and indirectly date), plus objects and arrays. Any development environment should understand those types, and can use them to represent just about any other type with them. JSON objects can be easily disassembled without a schema and just about any language can turn a JSON result into a object graph without any special tools other than a totally generic JSON parser.

I agree. It's why JSON has been gaining popularity. It's much better at machine-to-machine data interchange.

>I'm pretty sure you can't do that with XML. If I send you an arbitrary XML file with even a single namespace, nested structure, without any further information I'd like to see you turn that into a FoxPro data structure without making a lot of assumptions on what the data types mean. Is that number a number or is that number a string? Is that True or False a boolean or is it a string? Is that string a string or is it an enum value?

That's one of the reasons an object-oriented database is desirable. You can load data into it, and then query it as you desire. Dates can be returned as integers. Integers can be returned as floating points or character strings, etc.

If you get into a system where you really don't know what data you have coming at you, I'd make the argument that you're simply doing it wrong.

I had occasion to download vc140runtime.dll tonight for an old Windows 7 PC I had that didn't have modern updates on it, and nothing of Visual Studio 2017. I went to log on using that machine (1 GB memory, single-core CPU, low-end device), and it took five minutes to load Firefox.

That kind of bloat is something none of us need, and whereas on modern equipment with multi-cores and GBs of RAM it's relatively fast, it's nothing compared to what it could be. One of the goals of Visual FreePro was to create a remote form, one that existed on a server that you would download and run, along with any data that was required to present it. The form was a program like an SCX in VFP, and the data was the data environment required to make the form work. It would allow people to have web experiences without a web browser, similar I presume to what FoxInCloud does, but without the translation.

My goals were efficiency and speed, and they remain my goals. There's no reason to have a multi-scores of MB web browser install to present web content. A few MB framework operating with a few driver DLLs for the various types, and it will all work and be as extensible and flexible as what we see today, and for the most mundane tasks, even far more efficient using a true client/server or peer/peer data exchange.

>It's also important to remember that although we use both XML and JSON as configuration and editable formats, the reality is that they are still machine based implementations to exchange data.

I wouldn't want to use XML for data exchange when there won't be human eyes on it. But if the need is ever there to go into the file manually and examine it, alter it, etc., then I would always go XML.

> That we can edit these files is more of a side effect. Their primary purpose is data exchange not manual editability. Lets not forget that XML also requires some encoding for string data as there are a handful of characters (<>&#) have to be encoded as they serve as delimiters for elements and dates that have to follow a pretty terse syntax which is not that dissimilar to JSON's ISO-8601.
>
>My point here isn't trying to dismantle XML :-) but to point out why things have moved in a different direction from 10 years ago.

There are a lot of people trying to move things in new directions. Not all of them are good. JSON is a good one for data interchange, but this migration of everything to the cloud, and web browsers to be our eyes into everything ... it is a wrong direction. It makes us renters, not owners, and it will be the enslavement of the online connected populous, rather than its savior.

We need to maintain local control of our software and data, running local apps, and then sharing data between systems without cloud services if we so desire. Peer-to-peer works just fine, as do client/server systems for mass distribution. When you get into cloud systems, you're dealing with your data and apps running on someone else's equipment, and you have no idea what's going on behind the scenes. It's like Echelon technology in cell phones, believed to exist for years but never proven, until finally one day it was proven and it was revealed that there's a whole operating system and machine state running behind the one you see. It allows remote entities to turn on your microphone, your camera, download your content, push out new software, install or un-install apps, etc. You never see any of that because your phone keeps working like you expect.

With all of this data in the cloud and remote apps running on leased equipment ... so long as it's running and processing your data and you're getting the results you seek that's great ... right? But what else is happening behind the scenes? What code that you've written is being mined for new techniques, interesting ideas, better patterns of whatever? A .NET-based environment is great ... but are you running the same .NET environment on the remote server? So long as it presents outwardly that it's the same ... you are ... right?

And now we have Microsoft owning GitHub. All of those private repositories that people pay for to keep private, now with Microsoft's eyes on everything.

It's too much power and authority, and there's too much precedent with things Microsoft and Cortana and Windows 10 being data gathering tools / systems. Spy agencies would've loved to have such comprehensive information on people ... and with the revelations of Edward Snowden in 2013 on what was going on back then ... what more is being done today?

There is a mass pulling of us away from independent owner-based machines, and a movement toward making us renters. They want our data away from our control so they are the ones in control. And people who use such systems blindly because they work and are a way to make money and they integrate with this, that, the other thing ... they're really being duped into giving away everything of independence, everything of Liberty, everything of that which made the Internet something amazing back in that 10-year-ago timeframe you're talking of, for that's literally about when the break was made (between 2006 and 2008, which was Apple releasing iPhone, and Microsoft's Azure announcement).

Wake up, Rick. Unless we (collectively) work together and seek to educate others likewise to combat this trend ... it will soon be game over for our customizable online world. We will only be able to receive and use what we are given, and none of that will be to our benefit ... even though it may seem like it outwardly.

Go back to the archives from 2012-2015 and listen to speeches and presentations on YouTube given by people like Eben Moglen. He spoke of people in the Obama Administration, for example, who said they needed to "paint a comprehensive picture of society," and a lot of those news items we see that are so shocking ... they've been engineered as information-gathering tools used to see how people respond to things. Recent talk of infanticide by Virginia's governor! Are you serious? People in Congress moving us toward socialism! Are you serious? People put under lengthy confirmation hearings! Are you serious? And it goes on and on into the daily news.

We are being placed into the position of lab rats, and most people are completely blind to it.

I desire to do something different. It's why I build the things I build upon the foundation I build them upon, because only there is there a solid bedrock upon which to build, for all of the things I personally might seek to do would only be "RCH things," and if you and I came together to work on something it would only be "RS-RCH things." We need something more solid upon which to build, with a pre-defined set of guidelines on how to regard our fellow man, and then how to proceed rightly toward them. We cannot do it alone because what we would produce would eventually wind up being like what we see from Microsoft and other large corporations. It requires purposeful discipline and serious focus and attention to detail.

I'm still desiring to complete Visual FreePro, Jr. first (Nearly 100% VFP compatible, plus many general XBASE enhancements), and finally Visual FreePro (full version, something similar to .NET but based on a combination of a C/C++ like language as well as integrated XBASE for quick tasks.

I have plans in motion to complete these things and am diligent in my efforts in moving forward. Having found no lasting support now for (what will be 7-years this July) a long time, I alone press on and have had to regroup on three separate occasions beginning in 2014. Still, I remain resolute because I know the reasons I am moving forward. They are for our best ends, and our best application of technology for business apps that benefit people (all people).

You owe it to yourself and your fellow man to poke your head up from the computer screen, and sit back and think about what's happening to this world. Things are moving in a direction which takes away all of our ability to maintain autonomy in our computing needs. We are being herded into corals where we can be monitored and eventually controlled as standards move in and out of favor, each one designed to lead us further away from autonomy.

Consider what's happening philosophically to our world, and then look within to see what you can do to help counter it. There is a better way for people than what we are being given. It's the way of helping people, rather than using and abusing them with things like planned obsolescence, and non-repairable / non-interchangeable parts. It has to do with loving one another, rather than looking upon people as a source of revenue or something worse.

This movement to the online exchange of data using JSON or XML ... it's one tiny facet of this larger philosophical position / argument. I urge you to look at the big picture and truly try to see what's going on. It is not good. In fact, it's the most scary thing I've ever seen because people are buying into it hand-over-fist, willing to sacrifice all online anonymity for some shiny new app or device. We owe it to the beautiful and amazing people in this world to teach them the truth and move them away from those who would guide them into herded corals. I hope you'll think on these things, and press in and seek the truth about all of it, even all things.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform