This article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.ComputingWikipedia:WikiProject ComputingTemplate:WikiProject ComputingComputing
I don't think this article should be deleted if it is still up for deletion. There are lots of these articles, they are useful for finding out information and comparing different things quickly.
XML provides a basic syntax that can be used to share information between different kinds of computers, different applications, and different organizations. XML data is stored in plain text format.[1] This software- and hardware-independent way of storing data allows different incompatible systems to share data without needing to pass them through many layers of conversion. This also makes it easier to expand or upgrade to new operating systems, new applications, or new browsers, without losing any data.
It supports Unicode, allowing almost any information in any written human language to be communicated.
The strict syntax and parsing requirements make the necessary parsing algorithms extremely simple, efficient, and consistent.
Content-based XML markup enhances searchability, making it possible for agents and search engines to categorize data instead of wasting processing power on context-based full-text searches.
The hierarchical structure is suitable for most (but not all) types of documents.
It is platform-independent, thus relatively immune to changes in technology.
Its predecessor, SGML, has been in use since 1986, so there is extensive experience and software available.
Disadvantages
XML syntax is redundant or large relative to binary representations of similar data,[2] especially with tabular data. However, this is comparing apples to oranges: binary versus text-based representations. This is not specifically a disadvantage of XML as the same applies to JSON and other text-based formats.
The redundancy may affect application efficiency through higher storage, transmission and processing costs.[3][4]. However, efficient stream-based parsers do not require memory storage of XML and can efficiently extract data, e.g. SAX and pull-parsing.
Expressing overlapping (non-hierarchical) node relationships requires extra effort.[7]. However, SOAP encoding demonstrates the ease by which graphs are serializable using proper ID and IDREF usage.
Transformations, even identity transforms, result in changes to format (whitespace, attribute ordering, attribute quoting, whitespace around attributes, newlines). These problems can make diff-ing the XML source very difficult except via Canonical XML.
^
Harold, Elliotte Rusty (2002). Processing XML with Java(tm): a guide to SAX, DOM, JDOM, JAXP, and TrAX. Addison-Wesley. ISBN0201771861.XML documents are too verbose compared with binary equivalents.
^
Harold, Elliotte Rusty (2002). XML in a Nutshell: A Desktop Quick Reference. O'Reilly. ISBN0596002920. XML documents are very verbose and searching is inefficient for
high-performance largescale database applications.
^However, the Binary XML effort strives to alleviate these problems by using a binary representation for the XML document. For example, the Java reference implementation of the Fast Infoset standard parsing speed is better by a factor 10 compared to JavaXerces, and by a factor 4 compared to the Piccolo driver, one of the fastest Java-based XML parser [1].
^A hierarchical model only gives a fixed, monolithic view of the tree structure. For example, either actors under movies, or movies under actors, but not both.
^
Lim, Ee-Peng (2002). Digital Libraries: People, Knowledge, and Technology. Springer. ISBN3540002618.Discusses some of the limitation with fixed hierarchy. Proceedings of the 5th International Conference on Asian Digital Libraries, ICADL 2002, held in Singapore in December 2002.
^Searle, Leroy F. (2004). Voice, text, hypertext: emerging practices in textual studies. University of Washington Press. ISBN0295983051. Proposes an alternative system for encoding overlapping elements.
Human Readable?
XML should only be tagged as partially human-readable, the simpler XML files, basic XML files can be, but onces xmlns and xsd come into play, it quickly becomes not human-readable. Another factor is that it's not always possible to properly reformat/indent XML for readability without affecting content. 81.220.246.44 (talk) 14:20, 24 October 2014 (UTC)[reply]
Quite Human Readable!
Concerning the "not human-readable" implements mentioned above, XML namespace specification attributes ("xmlns") and XML schema definitions (XSDs) are text just like XML, and perfectly human-readable. And you absolutely can reformat/indent XML w/out affecting content; that/explicit value delimitation via tag/attrib is the whole point/benefit over whitespace-delimited encoders like YAML (1 detriment of which is the negative effect of improper/varied indentation). — Preceding unsigned comment added by 192.91.171.42 (talk) 17:11, 17 January 2020 (UTC)[reply]
JSON Associative Array Error
The JSON associative array sample - {42: true, "A to Z": [1, 2, 3]} - looks wrong to me (and also to JSONLint). In JSON the property names ("keys" if you will) must be double-quoted strings. Neither numbers nor unquoted strings are valid, hence 42 cannot be a property name, although "A to Z" can, as can "42".
As I understand the intention of this article, Java Serialization should be a part of it. It is one of the commonly used object serialization formats (e.g. for RMI communication). — Preceding unsigned comment added by 217.18.178.110 (talk) 12:52, 20 June 2014 (UTC)[reply]
Missing Python Pickle
As I understand the suggestion has been made that Java Serialization should be part of this article, what about other language-specific serialization formats, such as Python's pickle? 195.212.29.89 (talk) 07:00, 25 September 2014 (UTC)[reply]
From the github: "Bond is a cross-platform framework for working with schematized data. It supports cross-language de/serialization and powerful generic mechanisms for efficiently manipulating data. Bond is broadly used at Microsoft in high scale services." — Preceding unsigned comment added by 82.136.100.19 (talk) 10:11, 30 January 2015 (UTC)[reply]
The term Standardized leads to a page describing National and International Standards. Many of the of the entries are misleadingly listed as "Standardized" when in fact they are not standardized protocols, never having been approved by a due-process ANSI or ISO approved standards development organization. For example, Apache is not an ANSI or ISO approved standards development organization and therefore Avro is not a standardized protocol unless it is submitted and approved by such a body. — Preceding unsigned comment added by Posicks (talk • contribs) 15:45, 9 May 2015 (UTC)[reply]
I have just modified one external link on Comparison of data serialization formats. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.
This message was posted before February 2018. After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than regular verification using the archive tool instructions below. Editors have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the RfC before doing mass systematic removals. This message is updated dynamically through the template {{source check}} (last update: 5 June 2024).
If you have discovered URLs which were erroneously considered dead by the bot, you can report them with this tool.
If you found an error with any archives or the URLs themselves, you can fix them with this tool.
I have added a row for HJSON, which an IP removed. The reasoning is that we don’t include human-readable “user interface” formats, but we already have YAML here, which is a human-readable superset of JSON.
Not having HJSON on this page makes the Wikipedia a worse place, because it deprives its readers from knowing about a perfectly useful serialization format which has some features JSON lacks (comments, multi-line strings) while not having the complexity of YAML. As per WP:NNC, this content should be restored. No, I have no relation to HJSON, except that it’s a useful data format I wish I knew about earlier. Samboy (talk) 19:56, 13 August 2019 (UTC)[reply]
HJSON doesn’t have enough stuff in books or magazines to make a full article, but I think we can add a sentence mentioning it to the JSON article because of Edelman, Jason; Lowe, Scott; Oswalt, Matt. Network Programmability and Automation. O'Reilly Media. for data representation you can pick one of the following: YAML, YAMLEX, JSON, JSON5, HJSON, or even pure PythonSamboy (talk) 20:27, 13 August 2019 (UTC)[reply]
I didn't claim that Hjson is a "user interface format", I claimed it is a "user interface", period. Just see the title of hjson.org, which states "Hjson, a user interface for JSON". The comparison to YAML is flawed, since YAML is a data-serialization format, while Hjson doesn't even claim to be one. Likening Hjson to the programming language Python isn't helping the case. Shall we include Python in the list as well? I have yet to see anything that makes Hjson noteworthy in either this article or the JSON article. It's great that you have found a UI to JSON that you like, but Wikipedia is not a linkfarm. 185.213.154.172 (talk) 20:43, 13 August 2019 (UTC)[reply]
I agree that we shouldn’t make Wikipedia a link farm, but I also feel we should not completely ignore useful reliably sourced information. HJSON (and JSON5) are both mentioned in a reliable source, and mentioning them in the JSON article has a much lower bar of entry than a standalone Wikipedia article; as per the WP:LINKFARM concerns, I did not hotlink to the web pages (I assume our readers are smart enough to perform a Google search), but I think naming them in a single short sentence in JSON (where we already have an extensive discussion of YAML) is acceptable now that I have a reliable source which names them. 21:12, 13 August 2019 (UTC)
You rewrote and replace your comment, while I was replying to it. So I had to start my reply from scratch. You seem to have understood that the arguments where flawed. My understanding is that including Hjson in this article would be wrong in regards to the article's topic, and to include it in the JSON article is giving it undue weight. Discussing YAML in the JSON article is completely different. YAML is a standard, it a serialization format (not a "configuration" format), it's a JSON superset, et cetera. 185.213.154.172 (talk) 21:20, 13 August 2019 (UTC)[reply]
I agree with MrOllie above. I would like to add that when an article for Hjson exists, and the configuration file format is shown to be noteworthy, it seems like it would best fit in the "See also" section of the JSON article, under "Related formats". 185.213.154.172 (talk) 22:20, 13 August 2019 (UTC)[reply]
Additional and upcoming formats possibly not worthy of mentioning in the main article, but shall be gathered anyway
Okay, there are a lot of formats out there. I open this section to collect and reference them, and if they reach the notability threshold they can be included in the main article. I'm sure there's plenty.
Also there is some discrepancy/overlapping between data-serialization formats, data exchange formats and configuration file formats, I do not make distinction here since - in my opinion - they are mostly the same set with very similar purposes and only slightly specificattributes. --grin✎09:39, 20 February 2020 (UTC)[reply]
@Grin: TOML isn't a serialization format used as a configuration file format (as often happens), it's explicitly designed as a configuration file format. To quote the official objectives: "TOML aims to be a minimal configuration file format that's easy to read due to obvious semantics."
The same goes for INI files, and HOCON (it's even in the name: Human-Optimized Config Object Notation). To quote the HOCON informal specification: "The primary goal is: keep the semantics (tree structure; set of types; encoding/escaping) from JSON, but make it more convenient as a human-editable config file format.". Thus everything that HOCON can serialize, JSON can serialize. HOCON is entirely superfluous when it comes to serialization (which this article is about).
This article is crowded as is. If someone wants a table comparing configuration file formats, then why not create the article Comparison of configuration file formats? Then this article could link to that, and that article could link to this. Nothing's stopping that, right?
Obviously not right since I guess it would be deleted within the first few minutes, with the justification "there's already data-serialisation format article, insert it there", or at least this have a pretty high probability of happening. But it's not my child, do as you please. *shrug* --grin✎14:12, 21 June 2020 (UTC)[reply]
@193.138.218.217, I'm not sure why you are talking about serialization formats and configuration file formats as if they are mutually exclusive. Anyone can use a configuration file format for serialization, and anyone can use a serialization format as a configuration file. The intended usage is irrelevant. All of the below formats should be added to the article. ----Cowlinator (talk) 15:43, 16 February 2021 (UTC)[reply]
Other media types like images, audio and video are data too. The main difference might be that they usually are binary encoded, but that's okay since there are plenty of binary data formats already in the article Comparison of data-serialization formats.
I suggest referring to Media types as they're standardized.
Hi, I' missing a key characteristic (at least, it's key to me).
Lacking a better name for it, we can refer to it as streaming. A data serialization format supporting streaming would mean that it supports a unlimited amount of items in one data stream.
Yes, we should add a stramable field. It can be argued though that JSON is partially streamable, as there is no rule against sending multiple objects in one document.
I propose:
- Streambale: Yes. This means it is explictly designed for streaming or live-appendation, such as CSV and log files.
- Streamable: Somewhat. This means it was not designed for it but it has methods to stream it. (Such as making a file/stream an implicit array of JSON objects).
There is also the PostScript binary format. It has the advantage that you might not need to parse all of the data to find something; each part contains the address of the sub-parts. However, it also has disadvantages such as lack of 64-bit integers, and strings cannot exceed 64K. --Zzo38 (talk) 01:34, 6 April 2024 (UTC)[reply]
This is true, but there is the PostScript binary serialization format, which is a subset of PostScript like JSON is a subset of JavaScript. (The PostScript binary serialization is a perfectly valid PostScript code. PostScript has the unusual feature of being a programming language that can be written in text but also has binary forms for many tokens and allows them to be mixed together in the same program.) --Zzo38 (talk) 05:49, 31 December 2024 (UTC)[reply]
Very difficult to read
I'm viewing this on an average-sized monitor using Chrome and it's very very difficult to "read" these tables as I can only see half of the table. I have to scroll down to the bottom of the table, where I find a horizontal scroll bar, move it along, then go up but then I can't see what on earth I'm looking at because I've lost the LHS. It's basically unviewable. What madness is this? 2A02:C7C:5C4A:6900:18D1:DEE:D5D5:4EB1 (talk) 12:10, 26 August 2024 (UTC)[reply]
Data type comparison
I think it would be worth to compare what data types are available. Some such types are:
Null
Boolean
Integers: Some will limit the number of bits and some have no maximum.
Floating point
Bit strings
Byte strings
Character strings: There is also consideration of character sets. For example, some formats are limited to Unicode, while others allow other character sets. (Some formats have no character string type separate from the byte string type.)