From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: toke@toke.dk Received: from krantz.zx2c4.com (localhost [127.0.0.1]) by krantz.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 6249768c for ; Wed, 17 May 2017 17:56:18 +0000 (UTC) Received: from mail.toke.dk (mail.toke.dk [52.28.52.200]) by krantz.zx2c4.com (ZX2C4 Mail Server) with ESMTP id eb3c2c83 for ; Wed, 17 May 2017 17:56:18 +0000 (UTC) From: =?utf-8?Q?Toke_H=C3=B8iland-J=C3=B8rgensen?= To: "Jason A. Donenfeld" Subject: Re: Text-based IPC for Userspace Implementations References: Date: Wed, 17 May 2017 20:07:41 +0200 In-Reply-To: (Jason A. Donenfeld's message of "Wed, 17 May 2017 16:00:17 +0200") Message-ID: <87wp9fuzki.fsf@alrua-karlstad> MIME-Version: 1.0 Content-Type: text/plain Cc: WireGuard mailing list List-Id: Development discussion of WireGuard List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , "Jason A. Donenfeld" 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