You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Non-ASCII text in Result.to_json(): raw UTF-8 on the JVM wheel, escaped on the native wheel #454
A non-ASCII string in Result.to_json() is raw UTF-8 on the JVM wheel and written with \u escapes on the native wheel, as the probe behind #446 showed (I noted it in the status comment on #314, item 5, and it is not in the golden test yet). Both texts are valid JSON and parse to the same string, so the values are equal. What differs is the text: its length and its bytes, which matters to anything that hashes, diffs, or measures the text of to_json().
I have not measured how much longer the escaped text is for a table that is mostly non-ASCII.
What I would do: write raw UTF-8 on both wheels (shorter and readable, and the JVM wheel already does), which changes the native writer, and pin it in tests/test_cross_wheel_golden.py with a string that has a two-byte and a four-byte character. If the native writer cannot do that cheaply, the fallback is one sentence in the docs that the text of to_json() is not byte-equal between wheels and that the parsed values are.
Refs #314 (item 5 of the status comment of 2026-11-22). Items 2 and 4 of that comment (the float text and the last digits of vector distances) are about float32 rounding and stay in #314 as documentation points.
Activity