News for hackers. Stuff that matters.
Re:SQLite Release 3.42.0 by cryptonector on Tuesday May 16, 2023 @11:14AM (#35962972)
> > Strings may be single quoted.

Hmmm... It's super convenient that SQL uses single quotes for string literals while JSON uses double quotes. Changing that is going to cause pain.

> > Strings may span multiple lines by escaping new line characters.

I really can't recommend this. Yeah it's annoying to have to write \n, but still.

Re:SQLite Release 3.42.0 by masklinn on Tuesday May 16, 2023 @11:56AM (#35963619)
> Hmmm... It's super convenient that SQL uses single quotes for string literals while JSON uses double quotes. Changing that is going to cause pain.

Surely you're not constructing queries by concatenating JSON to text?

> I really can't recommend this. Yeah it's annoying to have to write \n, but still.

I can only disagree, the ability to just put newlines in a string literal in languages like rust is refreshing.

Re:SQLite Release 3.42.0 by cryptonector on Tuesday May 16, 2023 @12:04PM (#35963781)
> Surely you're not constructing queries by concatenating JSON to text?

Of course not, but I do have code that generates SQL and which uses JSON. (And no, the code in question is not subject to SQL injection.)

Re:SQLite Release 3.42.0 by masklinn on Tuesday May 16, 2023 @12:10PM (#35963867)
I fail to see how this is relevant. Your code feeds JSON to SQL, that remains supported. Or your code fetches SQL-generated value from SQL, in which case as literally stated before the JSON5 listing:

> JSON text generated by [JSON] routines will always be strictly conforming to the canonical definition of JSON.