Hacker News new | past | comments | ask | show | jobs | submit login

> where NUL is encoded as 0xC0 0x80.

Damn, that's a clever idea!

> I dread ambiguous numbers like "1,001".

Good enough for me. Commas will be removed.

> accept LF and CR LF on reading, but prefer LF when writing.

That's the current behavior.

> and you don't want to force every programmer writing a simple traversal algorithm to correctly handle cycles.

Ugh... I really really REALLY want you to be wrong on this :(




>> accept LF and CR LF on reading, but prefer LF when writing.

> That's the current behavior.

I'd suggest changing the SHOULD to MUST here, and remove the "foreign or unknown system" part:

    but encoders SHOULD output LF when the destination is a foreign or unknown system.
It's ok if a CR LF sneaked in because a user edited a file manually, but encoders should be more predictable.

>> and you don't want to force every programmer writing a simple traversal algorithm to correctly handle cycles.

> Ugh... I really really REALLY want you to be wrong on this :(

I have some good news then.

I just checked, and most of my JSON traversals are for things that you already take care of, like binary arrays and handling cycles (huh, talk about irony).

And the billion laughs problem was mostly because XML entities are more like macros, and expanded in place. As long as the reader doesn't try to convert the document to JSON, or naively print the object graph, it should be ok.

I think it might be ok to keep references.

And again, cheers for the encoding specification! It's really cool, and I hope it catches on.




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

Search: