in XML, every single non-empty tag needs both its opening and closing tag. that's at least seven characters.
Not only is it impractical, it is ugly and consists of a waste of space.
This has to change. Starting today you can begin using a proper programming-like syntax for your configuration files and any other need for a quick and easy-to-read markup protocol.
https://github.com/deepaaa/rana
USING ARCH LINUX? Why not get it directly from the AUR? Just runyaourt rana-git
and get it installed in the blink of an eye!
Github url doesn't work. Also what's up with yaml or json?
>>57825194
https://github.com/deeepaaa/rana
fuck me
Just use json.
it's shit just use JSON or toml
>>57825253
>>57825194
json has another purpose. yaml is indentation hell, just like toml (AKA "yaml is too mainstream for me")
we need more standards
>>57825319<?xml version='1.0' encoding='UTF-8'?>
>>57825157<array>
<element>0</element>
<element>1</element>
<element>2</element>
<element>3</element>
</array>
vs.{"array":[0,1,2,3]}
why this is even a question boggles my mind.
>>57825764{"array":[0,1,2,3]}
vs.[0,1,2,3]
why this is even a question boggles my mind.
I need compatibility. Are there libraries for my hipster language to process your hipster language?
That's why JSON was invented, retard.
>>57825157
>a proper programming-like syntax for your configuration files
Or just plain use a proper programming language for them. Write your config files in an embedded scripting language like Tcl or Lua. Too fancy/too Turning complete for you? http://json5.org/
>>57825157
>the project to give SGML a better look
wew, lad
>Starting today you can begin using a proper programming-like syntax for your configuration files
I can already do that.
>and any other need for a quick and
That's what binary formats are for.
>easy-to-read
It's not easier to read than XML.
>>57826090
>JSON
>configuration
>>57825157
I agree. XML was a horrible ida
>>57825157
I'm sorry mr. deeepaaa, but I find that syntax horrible.
>>57826184
>http://json5.org/
>hson
>stingray sjson
/thread
>>57826184
>http://json5.org/
>npm install json5
>npm
>>57826184
So it's just javascript.
>>57826264
>node
Just use another of the zillions implementations.
>open xml file
>convert it to json
bam
>>57826264
https://github.com/json5/json5/wiki/The-JSON5-Grammar
Feel free to port it to your favorite programming language. With a parser generator it should only take a few hours. That said, your favorite programming language probably already has something like it implemented as a library.
>>57826334
No. It's JSON with comments, tailing commas, etc.
>that's at least seven characters.
Oh boy...
There's nothing wrong with XML, saving a few bits of data is fucking stupid unless you're transferring huge amounts of data very quickly over limited bandwidth
Also what's the point of this? The code before it gets "converted" to XML looks very unreadable to me, sounds like you just figured out how interpreting and compiling work so decided to create another useless library that nobody needs.
I respect the effort, but I honestly see no value in this.
OP is a faggot
>>57826365
>saving a few bits of data is fucking stupid unless you're transferring huge amounts of data very quickly over limited bandwidth
I've seen xml used for api call responses.
If you have tens of thousands of customers making requests, the size difference between xml and json does matter, even if the data size is small to begin with.
>>57826365
>I respect the effort, but I honestly see no value in this.
/thread
>>57825312
>json has another purpose
And this precludes me from using it to store data why?
>>57826437
Yeah, I've seen those too, I've developed API's that use XML (SOAP) and they worked just fine.
If you have thousands of customers making requests, the last of your concerns should be shaving off a couple of bits from the payload.
>>57825157
Holy fucking shit you can't make this up.
This is the contents of test.html: http://0x0.st/LS4.html
>>57826538
BTFO
T
F
O
>>57825157
Somehow this actually looks worse than XML.
>Starting today you can begin using a proper programming-like syntax
It already exists. Just use S-Expressions.(xml sucks)etc.
(array (0 1 2 3)) or '(0 1 2 3) or (list 0 1 2 3)
>>57826365
Replacing XML usually isn't about saving bits. It's about readability for the user/programmer, which can prevent editing errors and help debugging.
>>57826606
Better idea than OP's.