18:21:16flip214Hi. I'm adding JSON encoding to swank. The remaining issue is that a simple command to switch encoding over doesn't work, as the multithreaded swank
18:21:41flip214has no synchronization between running an EMACS-REX form and reading the next.
18:22:29flip214So READ-MESSAGE would have to auto-detect the encoding (based on #\( vs. #\{).
18:23:58flip214I could also offer slots in *EMACS-CONNECTION*, but as this should be read in DECODE-MESSAGE passing a simple value to READ-MESSAGE is too soon;
18:24:25flip214the loop will already have started READ-MESSAGE before the command to switch was processed.
18:24:37flip214So the slot would need to contain something mutable (eg. a list)
18:25:48flip214whose identity can be kept (by appending a new en- and decoder)
18:26:59flip214Or JSON decoding with auto-detection could be hardcoded in with some stub function that returns an error, and needs to be redefined to switch over; that wouldn't work per-connection, though.