Re: [TML] Computer Geek Request - Linux and/or Mac
Postmark 11 Dec 2016 11:55 UTC
On 10 Dec 2016, at 22:33, Thomas Jones-Low <xxxxxx@gmail.com> wrote:
>
>> On 12/10/2016 5:08 PM, Jeff Zeitlin wrote:
>>
>> Also, some opinion/debate, please: As a cross-platform data
>> storage/data transfer format: XML or JSON?
>>
>
> I've not touched Microsoft development tools in more than a decade so I'll avoid making any statement regarding them.
>
> XML vs JSON. I would select JSON. There are abundant, mature tools for parsing and managing either format. But unless you have some very specific data transfer requirement (e.g. metadata in your data), JSON is simpler (meaning smaller) and easier to manage. The extra bonus is it can be read by human beings easier.
If you want to publish the data format and validate that a document adheres to it, then XML is better. (Writing a decent XML schema is often harder than writing the document but many XML tools become a lot more helpful if you have one.)
If you want to embed paragraphs of text, JSON or XML documents in your file and still edit it directly by hand, then XML is better.
There are databases that can store XML as a native format (I've used Oracle, I'm sure there are others) and databases that store JSON documents (e.g. MongoDb).
Languages based on JavaScript can manipulate JSON easily, directly manipulating an XML is a bit more messy. On the other hand, if your thoughts turn to XSLT, you would find XML much easier.
tl;dr
If you don't have a data analysis department, choose JSON and regret it in 10 years.
If you do have a data analysis department, choose XML and regret it every day for the next 10 years.
:-)
Phil Kitching