Am I the only one who thinks XML is more readable?

Am I the only one who thinks XML is more readable?

Attached: json-vs-xml-which-format-to-use-for-your-api.png (634x453, 11K)

Other urls found in this thread:

web.archive.org/web/20090131081342/http://www.xmlsucks.org/but_you_have_to_use_it_anyway/does-xml-suck.pdf
quora.com/Are-self-closing-tags-valid-in-XML
json.org/
pythonforbeginners.com/dictionary/how-to-use-dictionaries-in-python
catb.org/esr/writings/taoup/html/ch05s02.html#id2901882
twitter.com/SFWRedditVideos

>Am I the only one who.....?
Kys

more readable but significantly less space- and CPU-efficient

XML should have supported self closing elements.

XML is too verbose, and worst of all is that verbosity doesn't make it any easier to parse.

yes

Neither of them are supposed to be readable. They're meant to be machine-parsable.

And also yes, you are

xml is true shit

web.archive.org/web/20090131081342/http://www.xmlsucks.org/but_you_have_to_use_it_anyway/does-xml-suck.pdf

I like xml but I'm afraid to admit that to anyone

ITT Java engineers who should kill themselves.

Tags are gay

>employee, employee, employee, employee, employee over and over vs employees: 1,2,3

Why would you prefer this

Are you retarded? Why would you bother with readable text if it wasn't for people to read?

there are use cases that xml fits and performs best, and there are use cases where json fits and performs best (nowadays the latter happens way more)
retards are those that are unable to use one or the other when they should, just because reasons

Fpbp

Because it's safe in poorly-encoded environments and every language has great support it. There are tons of programs that use JSON message passing between internal components that no human will ever see, simply because it's much easier to use and more ubiquitous than some unnecessary custom binary protocol

why not protobuf

Attached: ayy.png (1600x404, 173K)

If xml were written this way, sure.
However in the real world, people are using it really poorly.
James T. Kirk 40 Jean-Luc Picard 45 Wesley Crusher 10

is more typical for your example.

JSON is the choice for White People, you are literally using a nigger to do the job for you

XML looks like complete ass.

Properly indented and braced JSON would be more readable but the example in pic is ugly

Kek'd

Lol

Yes.

And what's up with that retarded JSON indentation? - nobody does that.

yes

>tfw

Attached: ;D.jpg (947x810, 94K)

Yes

Try formatting it less stupidly.

Attached: json.png (327x236, 816)

XML and JSON are not comparable.

Why not


?

Shut up Wesley

I have no strong opinion, I mostly work with XML at work but find both readable. Simple data like this I feel is what JSON was generally designed for as a competitor to XML in web APIs. Where as I mainly work with XML as a document markup language, where I don't think JSON would really fit at all.

The worst thing about JSON is you can't have trailing commas.
Hex notation for floats would be nice too, since converting to decimal is complicated and slow.

yet, but we enough reinventing the wheel they will be

Why not

?

Why not

?

yeah you're retarded.
the human that will read the json/xml is the programmer, and its easier to use because its human readable

Why not


?

yes

why not

James Kirk
40


?

this entire comment thread is why XML sucks. there are too many ways of doing the same shit and none of them are good.

XML is way uglier. And JSON is easier to parse, takes less characters to express the same things and has more features.

This is the only objectively wrong one, because you can't write a schema to this and you've omitted significant whitespace.

Because a person can have more than one name. And it's better to store the dob instead of the year (99% of the time anyway).


employee
James
Kirk
1978-05-09

As a rule of thumb: unless you are very VERY certain that a node will only have one instance of an attribute, and that attribute will not be subdivided further, use child nodes.

...

XML looks like HTML. JSON looks like Python.
Pick your poison.

>JSON (JAVASCRIPT Object Notation) looks like Python

>JSON looks like Python

>and has more features
Incorrect, but the lack of features is often considered a plus over XML.

no, but

quora.com/Are-self-closing-tags-valid-in-XML

>JaySawn looks like python

Thats weird.
You can have trailing comments in js arrays which is what JSON is.
But a person can only have one DoB. So why make that a child node?

Why not

is gay

Then for who are (((s-expressions))) for?

>which is what JSON is
Not quite, JSON has it's own specification
json.org/
And it doesn't allow trailing commas

Jews

>Javascript anything
>2018

Attached: 1525297384675.jpg (1280x720, 72K)

Attached: Screenshot_20180509_222035.png (332x262, 16K)

what are the JSON equivalents of DTD? XSD? XSL?

JSON definitely looks more readable, but that syntax is obnoxious. I wouldn't doubt xml executes faster.

wait... that's the way to spell it. I always do >JayEsOhEn

toml
[[empinfo.employees]]
name = "James Kirk"
age = 40

[[empinfo.employees]]
name = "Jean-Luc Picard"
age = 45

[[empinfo.employees]]
name = "Wesley Crusher"
age = 27

- employees
- name: "James Kirk"; age: 40
- name: "Jean-Luc Picard"; age: 45

CSV
name;age
James Kirk;40
Jean-Luc Picard;45
Wesley Crusher;27

this is also true for JSON. Did you even think about your what you were saying before posting?

I do like the simplicity of CSV, but it isn't the same as JSON/XML. For example, you are stuck to a rigid shape for all rows. In JSON, XML, and the like, you can have elements that have different structures, or lists with different amounts of items in them.

Because if you have a collection of people and need to select them all, you're fucked.

SCSV is fucking disgusting

XML is stupid because it has attributes and elements, when really only elements should exist.

just use sex pressions

God I hope so

You've hurt me today with your antics.

name age
James Kirk 40
Jean-Luc Picard 45
Wesley Crusher 27

Ah fuck you got me

Attached: confused dog.gif (499x300, 427K)

It is actually Jason.

JSawn. Fite me.

That example is entry level XML, add in the XML bombs, the parsing exploits, and all the crazy extra shit like XPATH and you have the full picture of the shittiness that is XML.

Don’t pussy out yet.

Attached: 3D3A022E-CCA1-4DEB-8764-A27509B44B2A.jpg (542x516, 182K)

serious.

I don't see the problem with XML.
I've always found it pretty straightforward.
I hear ppl complain about "having to write a really difficult site map in XML."
What's their problem?
I love it.

XML is easier to parse

underrated post

not using custom binary format to lock people into using your products and jewing them for support

json has no schema validation, and is chiefly used by pajeets

this

How's that possible when python doesn't use brackets

They probably meant Python dictionary literals:
pythonforbeginners.com/dictionary/how-to-use-dictionaries-in-python
released = {
"iphone" : 2007,
"iphone 3G" : 2008,
"iphone 3GS" : 2009,
"iphone 4" : 2010,
"iphone 4S" : 2011,
"iphone 5" : 2012
}

Attributes are for meta-data. The meta-data for an employee might be some internal ID that is not relevant to the outside world, or some classification/confidentiality of the data.

Name, DOB, etc. are regular properties of the employee.

Yes
XML is an abortion that is too verbose for no gain.

Jean-Luc
Picard

Attributes are for meta-data.


Hillary's satanic cult


Whitehouse Lunch Menu

That's not supported by JSON.

Another example of meta-data; the time when it was retrieved/generated. It is not related to the employee, but related to the employee's data that is stored in the elements.


Jean-Luc
Picard

>the state of Jow Forums

>DSV
mah nigga
still, colon would be a better choice
catb.org/esr/writings/taoup/html/ch05s02.html#id2901882
> Old-school Unix practice used to favor tabs, a preference reflected in the defaults for cut(1) and paste(1); but this has gradually changed as format designers became aware of the many small irritations that ensue from the fact that tabs and spaces are not visually distinguishable.

do you read machine code too, cuck?

CSV is garbage, design wise
>This format is to Unix what CSV (comma-separated value) format is under Microsoft Windows and elsewhere outside the Unix world. CSV (fields separated by commas, double quotes used to escape commas, no continuation lines) is rarely found under Unix.

>In fact, the Microsoft version of CSV is a textbook example of how not to design a textual file format. Its problems begin with the case in which the separator character (in this case, a comma) is found inside a field.
>The Unix way would be to simply escape the separator with a backslash, and have a double escape represent a literal backslash.
>This design gives us a single special case (the escape character) to check for when parsing the file, and only a single action when the escape is found (treat the following character as a literal).
>The latter conveniently not only handles the separator character, but gives us a way to handle the escape character and newlines for free.
>CSV, on the other hand, encloses the entire field in double quotes if it contains the separator.
>If the field contains double quotes, it must also be enclosed in double quotes, and the individual double quotes in the field must themselves be repeated twice to indicate that they don't end the field.

>The bad results of proliferating special cases are twofold.
> First, the complexity of the parser (and its vulnerability to bugs) is increased.
> Second, because the format rules are complex and underspecified, different implementations diverge in their handling of edge cases.
>Sometimes continuation lines are supported, by starting the last field of the line with an unterminated double quote — but only in some products!
> Microsoft has incompatible versions of CSV files between its own applications, and in some cases between different versions of the same application (Excel being the obvious example here).

how to into comments in json?

ugly kludges, usually

>not using csv for every data exchange on a 6mb long file

Stop using computers boomer