[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

what is better, JSON or XML and why?

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 16
Thread images: 5

File: JSON-vs.-XML.jpg (18KB, 400x194px) Image search: [Google]
JSON-vs.-XML.jpg
18KB, 400x194px
what is better, JSON or XML and why?
>>
>>60853785
YAML
>>
File: catwince.jpg (2KB, 125x125px) Image search: [Google]
catwince.jpg
2KB, 125x125px
>>60853820

>simple question on /g/
>literally in the first post becomes an opportunity to see who can think of the most obscure useless meme technology

its no wonder you fucking clowns think that indians are "stealing" your jobs. i can just see your resume now. and endless list of meme frameworks and half-broken open sores bullshit
>>
File: IMG_7327.jpg (455KB, 650x1030px) Image search: [Google]
IMG_7327.jpg
455KB, 650x1030px
>>60853785
json.
>>
A custom DSL that produces a custom binary protocol.
>>
File: 1496524866853.jpg (28KB, 307x462px) Image search: [Google]
1496524866853.jpg
28KB, 307x462px
>>60853919

why
>>
>>60853853
thanks for (you)
i'm not from burgerland
>YAML - obscure
have you ever encountered config files? oh right you're neet
>>
>>60853785
XML is an abomination when used for config files
I look at you apache, maven, etc
>>
>>60853785
For what? For pure data, I would say JSON, but for a largely text-based document with markup in between XML seems much better, as characters "default" to being in text nodes.
>>
>>60853785
>>60853820
neither

also see >>60854294
t. typesettingfag
>>
to transfer data? json
to transfer complex data? xml

for config files? yaml
small and allows comments
>>
(post
(name "Anonymous")
(comment "What about sexpr?"))
>>
File: xml_ascent.png (12KB, 836x574px) Image search: [Google]
xml_ascent.png
12KB, 836x574px
“The essence of XML is this: the problem it solves is not hard, and it does not solve the problem well.” – Phil Wadler, POPL 2003

http://harmful.cat-v.org/software/xml/
>>
>>60853785
They are both fairly simple, so I would suggest that you implement a json parser and a xml parser, then write a file in both formats and come to the same conclusion that json is better for small files and xml is better for large files that tend to get damaged.
>>
>>60854644
XML is better when you know a human is never going to read or manipulate it unless something goes wrong. JSON is easier to work with by hand.
>>
Something about XML is just comfy in a way I can't really explain, but for a more practical answer:
XML is designed to be extensible, while JSON was just kinda discovered to exist* and happened to be loosely extensible. Features such as namespaces and prefixes are really helpful and missing from standard JSON. XML document formats can even be defined in XML itself, while for JSON as far as I know there is no such standard machine-readable system for validating JSON documents. Correct me if I'm wrong though.

* I remember reading this somewhere but I can't find a source for it now so if it's wrong go ahead and ignore this bit
Thread posts: 16
Thread images: 5


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.