Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The biggest advantage of JSON (I believe) is that it was already supported by all web browsers, so it started out as a lightweight communication method with browsers, where in the early days you didn't really want to add an alternative heavy-weight parser.

From a quick google, urn isn't built into browsers. There is a urn-parser package on npm, but it hasn't been updated in 5 years, and has exactly 0 tests. That package tells me to use the URI package, which has an open issue saying it's broken in firefox since 2011!

I have a general policy of not writing parsers wherever possible, as they are (a) really hard to get 100% right, and (b) if no-one can be bothered to keep at least one parser up to date, then it doesn't feel like a well supported language!



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: