Earlier quoted context omitted.
One of the core aspects of XML that is really important is that no typing is inferred by the structure of the file unlike JSON. JSON is by nature tied to the JavaScript type system which is sparse and inaccurate. For example, if you look at the following: { "name": "bob", "salary": 1e999 } Ah crap! Deserializer blew (in most cases silently converting the number to null) bob 1e999 No problem. The consumer can throw th…
JSON's semantics is that you represent numbers by their decimal representation. In this particular case, you're giving a different representation, so of course you an pass it as a string.
Linus Torvalds: “I'm happily hacking on a new save format using ‘libgit2’”
71–80 of 265 posts
Re: Linus Torvalds: “I'm happily hacking on a new save format using ‘libgit2’”
#72Earlier quoted context omitted.
One of the core aspects of XML that is really important is that no typing is inferred by the structure of the file unlike JSON. JSON is by nature tied to the JavaScript type system which is sparse and inaccurate. For example, if you look at the following: { "name": "bob", "salary": 1e999 } Ah crap! Deserializer blew (in most cases silently converting the number to null) bob 1e999 No problem. The consumer can throw th…
JSON's semantics is that you represent numbers by their decimal representation. In this particular case, you're giving a different representation, so of course you an pass it as a string.
Re: Linus Torvalds: “I'm happily hacking on a new save format using ‘libgit2’”
#73I think this title is wrong. Firstly some clarification - this appears to just be about the persistence format for his dive log. It was XML, now it's git based with plain text. As someone who had to manage a system which worked with plain text files structured in a filesystem for a number of years in the 1990s, this is done to death already. You now end up with the following problems: locking, synchronising filesyste…
The impression I got was that he was going to store his data in a git object database and that the files would be virtual in there. It would be like the .git directory without the working files on disk. It's all just conjecture until his code his out. Regardless, I would think that some applications are simple enough (store few enough separate objects in the file system) that the issues you cite are not likely to cau…
Re: Linus Torvalds: “I'm happily hacking on a new save format using ‘libgit2’”
#74I just realized that Linus' posts are the only reason I ever go to Google Plus.
G+ is largely misunderstood. It is a lousy tool for interaction with people connected to you purely socially. It's a very good way to find and interact with people connected to you by interest.
Re: Linus Torvalds: “I'm happily hacking on a new save format using ‘libgit2’”
#75Earlier quoted context omitted.
Use 'asciidoc' for document markup. I just had a quick scan of the user guide. It's very impressive. Looks like markdown but with all the edge cases thought out.
I've been working with restructured Text a lot, it's a breeze as well. Seems quite similar.
Re: Linus Torvalds: “I'm happily hacking on a new save format using ‘libgit2’”
#76Earlier quoted context omitted.
The issue is probably that 99.999% of all XML use cases don't use (or need) the verification aspect. For all of those, XML is overkill. Besides, surely it would be possible to design a verification layer on top of JSON, for instance - the fact that one does not currently exist does not mean that XML (and abuse of XML!) should not be criticized.
One of the core aspects of XML that is really important is that no typing is inferred by the structure of the file unlike JSON. JSON is by nature tied to the JavaScript type system which is sparse and inaccurate. For example, if you look at the following: { "name": "bob", "salary": 1e999 } Ah crap! Deserializer blew (in most cases silently converting the number to null) bob 1e999 No problem. The consumer can throw th…
Right -- the parser blew it. That many implementations do this is frustrating (and caused me so many problems that I ended up building my own validator for problems like this: http://mattfenwick.github.io/Miscue-js/).
JSON doesn't set limits on number size. From RFC 4627:
An implementation may set limits on the range of numbers.
It's the implementation's fault if the number is silently converted to null.
I guess we need better implementations!
> JSON is a popular format but it's awful.
If you're willing to take the time to share, I'd love to hear more examples of JSON's problems. I'm collecting examples of problems, which I will then check for in my validator!
Re: Linus Torvalds: “I'm happily hacking on a new save format using ‘libgit2’”
#77Earlier quoted context omitted.
The issue is probably that 99.999% of all XML use cases don't use (or need) the verification aspect. For all of those, XML is overkill. Besides, surely it would be possible to design a verification layer on top of JSON, for instance - the fact that one does not currently exist does not mean that XML (and abuse of XML!) should not be criticized.
One of the core aspects of XML that is really important is that no typing is inferred by the structure of the file unlike JSON. JSON is by nature tied to the JavaScript type system which is sparse and inaccurate. For example, if you look at the following: { "name": "bob", "salary": 1e999 } Ah crap! Deserializer blew (in most cases silently converting the number to null) bob 1e999 No problem. The consumer can throw th…
Regardless, JSON is so much more readable that I'm very glad it's pushed XML out of the picture for the most part.
Re: Linus Torvalds: “I'm happily hacking on a new save format using ‘libgit2’”
#78Title is entirely misleading. Tech support! TECH SUPPORT!!
Re: Linus Torvalds: “I'm happily hacking on a new save format using ‘libgit2’”
#79Earlier quoted context omitted.
The issue is probably that 99.999% of all XML use cases don't use (or need) the verification aspect. For all of those, XML is overkill. Besides, surely it would be possible to design a verification layer on top of JSON, for instance - the fact that one does not currently exist does not mean that XML (and abuse of XML!) should not be criticized.
People seem to prefer JSON, but I don't find it any better to hand-write/hand-edit than XML. If anything it's slightly worse, because it has more syntax edge cases.
Could you provide examples? I'm trying to collect more examples for a JSON validator -- http://mattfenwick.github.io/Miscue-js/ (built during a big project using JSON, after I started running into some issues that I couldn't check using other validators)
I'd love to hear more examples if you're willing to share.
Re: Linus Torvalds: “I'm happily hacking on a new save format using ‘libgit2’”
#80This is what Linus does. He has strong opinions and he throws them around. You can't let that get to you. Both XML and JSON are just fine if used properly.