editor/client
pavel 8b1723ce31 Replace hand-rolled JSON protocol parsing with real JSON
Daemon: parse requests with kotlinx.serialization and read fields from
the params object instead of scanning the whole line for key markers,
which picked up decoy keys ("path", "version", "id") occurring inside
buffer text. Build all responses and events with JsonObject builders,
which also fixes unescaped control characters in output and \uXXXX
escapes in input. Malformed lines now get a BAD_REQUEST reply instead
of corrupting field extraction.

Client: quote outgoing JSON strings with a strict json_quote helper
instead of Odin's %q verb, whose \x/\e escapes are not valid JSON.

Verified end to end: adversarial payloads (decoy protocol keys,
unicode, control chars, malformed lines) against the daemon, and the
full client smoke flow (ids 1-10) against a real Gradle workspace.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 09:04:50 +02:00
..
odin Replace hand-rolled JSON protocol parsing with real JSON 2026-07-03 09:04:50 +02:00