Currently, the strings being output by Clangd are escaled with llvm::yaml::escape. But this is not entirely correct because it escapes a lot of additional characters things. For example, a 2 byte character "é" will be encoded with a \x which is not valid and this error is thrown by the VSCode client:
SyntaxError: Unexpected token x in JSON at position 291 at StreamMessageReader.onData at Socket.<anonymous> at emitOne (events.js:96:13) at Socket.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at Socket.Readable.push (_stream_readable.js:134:10) at Pipe.onread (net.js:543:20)
This change introduces an escaping function that does follow the JSON format.
For json we only need the first 2 though, right?