From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alex Kost Newsgroups: gmane.emacs.help Subject: Re: Can the json reader be a bit more lenient? Date: Sat, 03 Aug 2019 19:14:52 +0300 Message-ID: <87mugqmdj7.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="97633"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: "help-gnu-emacs@gnu.org" To: ndame Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 03 18:15:02 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1htwgN-000PAt-Ho for geh-help-gnu-emacs@m.gmane.org; Sat, 03 Aug 2019 18:14:59 +0200 Original-Received: from localhost ([::1]:40968 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1htwgL-0002Ip-Ve for geh-help-gnu-emacs@m.gmane.org; Sat, 03 Aug 2019 12:14:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38735) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1htwgF-0002IW-Sa for help-gnu-emacs@gnu.org; Sat, 03 Aug 2019 12:14:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1htwgE-0005Me-VR for help-gnu-emacs@gnu.org; Sat, 03 Aug 2019 12:14:51 -0400 Original-Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]:46062) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1htwgE-0005ML-MX for help-gnu-emacs@gnu.org; Sat, 03 Aug 2019 12:14:50 -0400 Original-Received: by mail-lf1-x12b.google.com with SMTP id u10so16262927lfm.12 for ; Sat, 03 Aug 2019 09:14:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=zZXHteLH2H9dHGFP4H17LdKY84kTN8Nzi2yYbd68AQA=; b=eCT0FfEgfgX08OSqUYzV65FnnzjPjsSvuXMV5FCtzngq7val+ysBHmR1tbPVOif15n bjBrASIEJ4wTMSQumOTR8GAzeuDudozmvcUe64ciBoDHQbRNK5ywEVRpa9vwGgGA60pW hJgi0iw7jU6hyGKgGu7uCXQ+i77FQQIPxi9ao3FJWn6OEjarlsRUmDRCYCw/lAHGgkcW Pi+brZG+32IKyLrP7JMFoM5//nVN2PiNq8/H3zEeu7meAnlaZYn2lR12BQDtWQdPe/lE 865CZyMtd+x7TbN2WgOz7PhiFrIQukKNpxQRX+MN7/0LYIovAKHBBaKCH0XgWtgOFR93 VdnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=zZXHteLH2H9dHGFP4H17LdKY84kTN8Nzi2yYbd68AQA=; b=mmoVn55dA6difeBo0AftG3N9Nyi+/eZL0ccWJ8vW8roUHkRMwcGDOen+RZVY5gOINF SQBKuYtVIIscTP6MfycetD4EnDQw91f6eWAzwI4FOCeyPEbll7k4HHhz4MqmPepj2fCw wJH2znUg8ao8OB4cAuGK3j2m0M8e0hHO6qQVM0s+cKuzAeZM6BTZCn00orLfEitVlewL otSHMgAl3mI4Oup/I4blVt1wUc9ajLLMSDvV6P66UCdNzu0S2L0761mx3nAssCJeALxw oeracL7g/KeQ0KNhy7GmAZfqfTd/KQImHbbsI/eVrGQgBvdTfMU6oDqez45YQJgqXJx4 GYTg== X-Gm-Message-State: APjAAAV0s2PbpsOn/NaBdSpHGs67O0Tuh1rfcttRmalhh6AGFYQA/0NO T5b+ZVCpx71S8m5aDSeY9dROWXW7 X-Google-Smtp-Source: APXvYqyLRreZKrDDJsWxjEM+TOXKBJpgsnf2JgTYFcrt9sW2BDM8cKV2Kl9E6mKcMo+H5iNyhsOnLQ== X-Received: by 2002:ac2:43bb:: with SMTP id t27mr32759627lfl.187.1564848888105; Sat, 03 Aug 2019 09:14:48 -0700 (PDT) Original-Received: from leviafan ([217.107.194.40]) by smtp.gmail.com with ESMTPSA id w28sm15701923ljd.12.2019.08.03.09.14.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 03 Aug 2019 09:14:47 -0700 (PDT) In-Reply-To: (ndame's message of "Wed, 31 Jul 2019 13:52:38 +0200 (CEST)") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::12b X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:121301 Archived-At: ndame (2019-07-31 13:52 +0200) wrote: > Lately I've been using emacs for some text data processing, and the > input is json sometimes. The problem is the json often comes like > this: > > =C2=A0 [{'time1: '8:00', 'time2': '13:00', ... > > and the emacs reader chokes on it saying > > =C2=A0 doesn't start with "! This error comes from 'json-read-string' function. > Now I know the json standard says attribute names should be double quoted, > but can it be somehow persuaded to accept single quotes instead? Not easily: I think the only way is to override the mentioned function. > It would be great to have an option for this when I know the data is > correct, only it uses single quotes instead of doubles. I think this feature request should be sent with "M-x report-emacs-bug". It's unlikely it will be noticed on this mailing list. --=20 Alex