From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1ifquk-0005rc-0w for mharc-grub-devel@gnu.org; Fri, 13 Dec 2019 14:47:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59886) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifquf-0005nY-00 for grub-devel@gnu.org; Fri, 13 Dec 2019 14:47:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ifqud-0006dg-Bn for grub-devel@gnu.org; Fri, 13 Dec 2019 14:47:44 -0500 Received: from dibed.net-space.pl ([84.10.22.86]:60579) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.71) (envelope-from ) id 1ifqud-0006R9-0N for grub-devel@gnu.org; Fri, 13 Dec 2019 14:47:43 -0500 Received: from router-fw.i.net-space.pl ([192.168.52.1]:50320 "EHLO tomti.i.net-space.pl") by router-fw-old.i.net-space.pl with ESMTP id S1935650AbfLMS4Z (ORCPT ); Fri, 13 Dec 2019 19:56:25 +0100 X-Comment: RFC 2476 MSA function at dibed.net-space.pl logged sender identity as: dkiper Date: Fri, 13 Dec 2019 19:56:22 +0100 From: Daniel Kiper To: Patrick Steinhardt Cc: grub-devel@gnu.org, Max Tottenham Subject: Re: [PATCH v6 2/6] json: Implement wrapping interface Message-ID: <20191213185622.erszru3ymhxg33kg@tomti.i.net-space.pl> References: <88d2b083df54635411e0c60aa2728b1e6d528cc6.1575969933.git.ps@pks.im> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <88d2b083df54635411e0c60aa2728b1e6d528cc6.1575969933.git.ps@pks.im> User-Agent: NeoMutt/20170113 (1.7.2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 84.10.22.86 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Dec 2019 19:47:47 -0000 On Tue, Dec 10, 2019 at 10:26:17AM +0100, Patrick Steinhardt wrote: > While the newly added jsmn library provides the parsing interface, it > does not provide any kind of interface to act on parsed tokens. Instead, > the caller is expected to handle pointer arithmetics inside of the token > array in order to extract required information. While simple, this > requires users to know some of the inner workings of the library and is > thus quite an unintuitive interface. > > This commit adds a new interface on top of the jsmn parser that provides > convenience functions to retrieve values from the parsed json type, > `grub_json_t`. > > Signed-off-by: Patrick Steinhardt Reviewed-by: Daniel Kiper Daniel