Text-based IPC for Userspace Implementations
Toke Høiland-Jørgensen
toke at toke.dk
Wed May 17 20:07:41 CEST 2017
"Jason A. Donenfeld" <Jason at zx2c4.com> writes:
> Hello list,
>
> Re:JSON --
>
> JSON is difficult to parse and requires large libraries, especially
> for something like JSON-RPC. I'd rather not have these dependencies or
> complications.
>
> On the contrary, a simple key=value newline scheme can be parsed
> trivially by anyone in a safe way, and allows for very quick in basic
> implementations in nearly all environments, even bash. Even given a
> JSON library, a stream of key=value is considerably easier and more
> flexible in the parsing stage.
My point was not so much "just use JSON". My point was "you are
disguising something that requires stateful parsing as a simple
key/value scheme, which is bound to lead to bugs eventually". I.e. if
someone were to write a parser that would (e.g.) just grep for a public
key, they'd end up with ambiguous results at best.
-Toke
More information about the WireGuard
mailing list