3 ms·
> you do still need to deal with the situation where the character shows up in your data JSON doesn't support binary data without conversion to string first.
by BugsJustFindMe 5y ago
> you do still need to deal with the situation where the character shows up in your data
JSON doesn't support binary data without conversion to string first.
- wolfgang42 5y agoI thought that you said that JSON was incidental and unimportant? My point is that using RS does still force escaping, in the general case; it’s not a panacea. You still need to figure out how to deal with your delimiter character appearing in the data. The way JSON Lines does this is by specifying the use of (a slightly limited subset of) JSON.
- BugsJustFindMe 5y ago> I thought that you said that JSON was incidental and unimportant? It is for this, but if we're already declaring a restriction to JSON then we're likewise declaring a restriction to unicode. All delimited data requires escaping if your delimiter can be part of a no-delimit sequence. At least a character explicitly intended for delimiting isn't part of any no-delimit sequences representable in unicode whereas \n is.
- wolfgang42 5y ago> we're likewise declaring a restriction to unicode. U+1E is a Unicode code point, and therefore requires escaping inside of a ‘no-delimit’ sequence of Unicode characters.