Why is the left still the format of choice?

Why is the left still the format of choice?

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

Other urls found in this thread:

8ch.net/tech/0.json
twitter.com/SFWRedditVideos

I would say it's far easier to parse than json.

Why did XML and JSON become popular instead of s-expressions, which is perfect for data formatting?

it's easier to look at, not easier to parse. Look at all that text bloat.

That json whitespacing really triggers my jimmies

XML is a markup language.
JSON is a shit. But people love shit if it works and they don'y have to come up with something better.

You have to at least justify this annoying syntax with a reason

Because it's not as fucking hideous as the right.

How would you unambiguously express a mapping data structure as a S-expression?
That is, if you encode and then decode a mapping data structure you always get a mapping data structure out, and if you encode and then decode a sequence you always get a sequence out.
A mapping data structure would be something like Python's dictionaries, and a sequence would be something like Python's lists.

Rate my language

Attached: ws.png (357x349, 9.68K)

Ironically android 'solved' xml by not putting content in the tags, rather the attributes of the tags define what actually is the content, the only time you would have content within tags is to use more tags.

XML has been dead for 15 years man

I prefer XML over JSON that hideous spacing makes me want to die.

user you can format xml exactly the same way. its a text format

json and xml suck ass. Edn is the best format i've seen

csv dude

GJ mate

8ch.net/tech/0.json

Look at that complete puke. Now imagine how much easier it would be to read if it was xml

Neither of them are intended to be human readable or editable, your argument is invalid.

You know XML looks like dogshit too when you strip out all of the whitespace.

Attached: Screenshot from 2018-05-10 20-16-44.png (882x950, 184.36K)

Because the one on the right is Reddit spacing

Its literally not tho

What people call "reddit-spacing" Is really just programmer-spacing. You can't use tabs to indent paragraphs (otherwise the comments are misaligned from the code), so you have to use a double-enter to denote them.

OP, XML is being used since the late 90's. There's way more content, tools and systems developed with it in mind.
If it was the other way around, probably XML wouldn't be largely adopted.
I just wish you never, EVER, have to deal with SOAP.


I didn't know that. Here's one example I found after a quick search:


It doesn't look bad at all.

DTDs
< Yes, that's a pun where I'm calling you a retard and answering your question.
XML has a defined mechanism for metadata about itself.

enjoy your telemetery, dumbass

...

XML is easier to parse because everything is in descriptive tags
JSON is a mess to parse because everything is nested in brackets

reddit spacing you fucking niggers

Attached: REDDIT.gif (1221x768, 698.63K)

Lol OP, come back when JSON has transformation capabilities as mature as XML, like xslt (pro tip you can't without named elements). Don't show me some edgy library or pseudo standard, because I know they are all shit.

After that, they might as well introduce namespacing support, it's there for a good reason in XML and that shitty JSON language just rapes you without it when you try to recognize by it's structure (pro tip you can't without a namespace).

JSON is a fucking joke, it should only be used for your soyboi projects and your's alone.

What people call "reddit spacing" is actually markdown.

please leave

Attached: DcZRUDPVQAAtNfC.jpg (500x324, 26.16K)

Yeah unless its literally in the official JSON RFC its fake shit even if trivial solutions have been around for 10 years! You tell 'em!

this board gets worse and worse every day

Attached: nou.jpg (500x324, 40.21K)

Do you even syntax analysis ?

A more important question: EBML vs. JSON?

This.


Write a fast json parser in c or c++ that shits out values, string or otherwise, with object,array,value as a header in single lines.
example:
["movies",378,"info","original_title"] "Flammen & Citronen"["movies",378,"info","actor_roles","Mads Mikkelsen"] "Citron"["movies",378,"info","actor_roles","Thure Lindhardt"] "Flame"
["movies",378,"info","titles",4] "Flame And Citron"

And most importantly, it has to work for non-standard implementations of JSON.

>Welcome to \/tech\/ -
It makes you puke because of the XML inside the JSON not because of the JSON itself.

NO

Whenever I see XML, I smell Pajeet.

Same here. It's degree of complexity is simply unnecessary in all situations.

It's also heavily associated with SQL, Java, .NET, and "Enterprise" frameworks.

maybe they think they need the supports, sometimes its necessary

It's literally just one really dedicated aspie. That's the entire 'reddit spacing' "crowd"

Name me the fucking standard for it then.

shiggery

My eyes like reading JSON. My computer likes reading XML. JSON was made for my computer to read, not me. My computer is not me. JSON is not XML. Therefore:- my computer thinks JSON is shit.

they're both shit, and no, XML is not the format of choice in any "modern" web shit. only enterprise bros use it and even then not much anymore

...

I would.

Attached: REDDIT_OVERLOAD.gif (1221x768, 751.86K)

Holy shit how can you be THIS stupid. Educate yourself.

Attached: redditspacing.png (866x475, 53.08K)

What if you just use org-mode a lot

You still don't understand that people who program for a living have reasons to type that way.

why are people posting markdown to a website that obviously doesn't have markdown support then

...

...

XML unironically looks better unless you're a symbols autist

xml is more powerful and therefore still needed. you nigger

nice one

why not?

Attached: Agiri.jpg (299x168, 7.47K)

no, it isn't, but neither is JSON

both of them use too many special symbols that require pressing two keys to get the symbol

Fuck off YAML shill. Go jerk off over the whitespace in your python scripts.

heh

Reddit uses markdown. It's markdown spacing. Markdown
follows a long line of email formats. Many email clients don't
softwrap, so if you want paragraphs you need to hard wrap.
HTML ignores hardwrapping, because it has it's own
softwrapping, so when you translate markdown to HTML, it
deletes your hardwraps. Where else is softwrapping ugly as
fuck? Oh right, when youre programming.

Why not just use S-expressions and load that?

(empinfo (employees ((name "James Kirk") (age 40)) ((name "Jean-Luc Picard") (age 45)) ((name "Wesley Crusher") (age 27)))) Fixed.

durr

XML and JSON were both disasters, but fail at different things so are used by different groups.

its not that hard to not press enter twice

::= (empinfo ) ::= (employees *) ::= ((name ) (age ))

wow that was hard.

My nigger.

Markdown would be escaping linebreaks with \

Looks like unreadable shit. You can tell where the words are, but if you fucked up the parentheses (for example remove one of the last 4) there's no way you would know at glance.

That's what computers are for.

Computers are for binary data, not your gay expressions.

Hello? These are formats for exchanging data between computers. Yes, we like if they are human readable, but of course the hierarchy will be ruined if you delete a character. You could make the same argument about json. You could make deleting a '/' from a closing tag in XML fucks it up too.

*make a mistake... which fucks it up...

Anyone here like YAML?

Do you even computer?

No you can't, the difference is that XML and JSON are much more human readable. If it's missing something then you can see it easily.

Wrong. JSON also suffers from bracket hell at the end of complicated structures ]}]]]}. I cannot help you understand the first part, just count it as yet another thing you failed to understand.

JSON isn't read by humans in a form with compressed brackets like LISPfags like doing with their shit. See . No one would ever do that kind of madness with C.

Much much easier to parse XML than JSON I guess? Not that you'd know, as you've never programmed even a reverse polish calculator parser.

XML is much more powerful

Name spaces. Metadata. Validators.
Apparently enough.

XML is easier to read, but JSON has semantics built-in which make object composition more straightforward. You have lists, maps, and singe-values. When I need to serialize data in a program I'm writing, it's conceptually clear how the objects or data will be mapped into a JSON object. With XML, you have only two types to work with: tree and single-values. There is a wider conceptual gap between the data being serialized and the format itself.

JSON has no types and adding types makes it look like shit. It has no comments and adding comments makes it look like shit. It can't handle binary data at all. Almost no JSON parser actually parses JSON correctly. Don't believe me? Try adding a large floating point number and then parse it and re-serialize it with your library of choice. You'll get data loss with almost all of them. It's webdev-tier garbage.

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

Hey javanigger, if you want to transfer data between computers efficiently, you compress it into a raw datastream. XML is best used for configuration data that needs to be both human-readable and easy to parse for computers (and in many cases, also easy for humans to edit in a text editor).

They're both unreadable but at least you can have an IDE that will highlight what's XML and what is not, and like user said XML is easier to parse. So that makes XML better.
And if you use JSON you're getting into the java ecosystem which anyone who values their time, money and sanity wants to avoid like the plague.

meant

Oh yeah, I feel really powerful when I parse an XML document and my computer needs to connect to some remote server to finish parshing it.
XML is powerful in the same way Javascript is.

Crucial:
Schemas
Namespaces

Convenience:
Comments
Cleaner diffs (that fucking comma at list/object end)

Minor:
Can be used for markup (quite niche)
Tool & library support that comes with being standard for decades. XPath, XSLT, etc (JSON is catching up)

Controversial:
Attributes (cancerous & misused in 95% cases, but perfect fit for 5%)

Only problem with XML is that is was used for simple cases, where it's functionality was overkill.


Into the trash it goes. There is a reason why JSON syntax is one page and YAML is a fucking book

Attached: valid_html.gif (48x32, 231)

>{0, 1123, -9} = jsonx:decode(, [{number_format, decimal}]).

And?

Now try re-serializing it with dumps. While it can be done, it's ugly.
>{0, 1123, -9} = jsonx:decode(, [{number_format, decimal}]).
Erlang is a meme. Try parsing a string with \ud83d in it.
And then try sending long floats to a browser and see what happens.