From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#32793: 27.0.50; json-parse-string doesn't have the equivalent of json.el's json-array-type Date: Thu, 11 Apr 2019 19:26:23 +0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="203582"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 To: Xu Chunyang , 32793@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 11 18:27:12 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hEcXg-000qrZ-Aq for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Apr 2019 18:27:12 +0200 Original-Received: from localhost ([127.0.0.1]:51876 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hEcXf-0001dd-9w for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Apr 2019 12:27:11 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:36815) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hEcXX-0001c3-Lg for bug-gnu-emacs@gnu.org; Thu, 11 Apr 2019 12:27:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hEcXW-0006a8-OQ for bug-gnu-emacs@gnu.org; Thu, 11 Apr 2019 12:27:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41547) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hEcXW-0006Ze-A1 for bug-gnu-emacs@gnu.org; Thu, 11 Apr 2019 12:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hEcXW-0000c2-5x for bug-gnu-emacs@gnu.org; Thu, 11 Apr 2019 12:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Apr 2019 16:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32793 X-GNU-PR-Package: emacs Original-Received: via spool by 32793-submit@debbugs.gnu.org id=B32793.15549999972322 (code B ref 32793); Thu, 11 Apr 2019 16:27:02 +0000 Original-Received: (at 32793) by debbugs.gnu.org; 11 Apr 2019 16:26:37 +0000 Original-Received: from localhost ([127.0.0.1]:55091 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hEcX6-0000bN-Vz for submit@debbugs.gnu.org; Thu, 11 Apr 2019 12:26:37 -0400 Original-Received: from mail-wm1-f43.google.com ([209.85.128.43]:38364) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hEcX5-0000bA-DY for 32793@debbugs.gnu.org; Thu, 11 Apr 2019 12:26:36 -0400 Original-Received: by mail-wm1-f43.google.com with SMTP id w15so7445081wmc.3 for <32793@debbugs.gnu.org>; Thu, 11 Apr 2019 09:26:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=vRYCKGp4I6Lh9eXeCCZ9g6HsIfJ9IhAVGtG0q5TNU94=; b=qiU+3JhY94VmXw64w0CtldH/v5kCikbAP45owOCJ+u8GqbM2VKF9UEB00TO2tTQhy7 BjRrROxib/0iWuIwxV44YwSoP+TNQwu2K37O+tLdqHng5zA7CoyOhsrKENRyrI6dpLDI Hwcz5T8BemVtqfzc3cF0mWQ6tMeeQzyh95sPhhGig1p9H3nDHfJpefojKkHs4YEA8XJA F2CTnqGpW/sdbR17f9j06bJiyOojKQSeKcLrzfGBv83ShtpslRtTyMQ4QSHMfF4rzv8n vFSGAkdf9HapiFSli82fQxSEVa64lXKzhFIIjEGWNu4yhkV7ZCp1Kxpuc5hS22A1wrJt qv0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=vRYCKGp4I6Lh9eXeCCZ9g6HsIfJ9IhAVGtG0q5TNU94=; b=qMxvAEoaWFJeyLqUC7ptJTLfyKOqPftBINrr3nHQp4GEOKZCHkyUmsify1bZJiXAS5 0pfYvKx1dHPwFXzAdHxNjk0NRCCc9OC0W2zZziLONOoHZyU+369lXnMIZkq6PWeqP1L4 6ABsinyJSUrVl+t/s0Z0B8Q/3RpvdcZXv+rDQENuzHD9psJ4Zk8q40ovNxUxJLI9zwBl f0InITBjfMqIAX9ytz2tpjTZyppKECd0ja+Qo18ABWCqBKGAKmnFtr8Kdc75gGjvGFHX +hKRFDFOWSLJE4kW9kLku1Fxo0oBhIZjUivpy4HS4NqRhMCGO5XpybZkc0ujnhERY+7O FJUw== X-Gm-Message-State: APjAAAU2q6pV4YwUr7iEBYyblulE6FBZj41iVXKNsTynWjxotG2ZHYde JwWYOhysEBnG26FrARHnBNRRwLuq X-Google-Smtp-Source: APXvYqxox/UAw5RA4+CFTB73ArJ/b3nQdm59QNvFcEtwZlKHxdm5YbVjw2jbnUdqmz8AJC25vhZQQQ== X-Received: by 2002:a7b:c111:: with SMTP id w17mr7339736wmi.6.1554999987390; Thu, 11 Apr 2019 09:26:27 -0700 (PDT) Original-Received: from [192.168.0.195] ([109.110.245.170]) by smtp.googlemail.com with ESMTPSA id z7sm36312433wrt.10.2019.04.11.09.26.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Apr 2019 09:26:25 -0700 (PDT) In-Reply-To: Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:157507 Archived-At: On 21.09.2018 15:56, Xu Chunyang wrote: > We can parse JSON Array as Lisp List with json.el, e.g., > > (let ((json-array-type 'list)) > (json-read-from-string "[1,2,3]")) > ;; => (1 2 3) > > but the new json-parse-string doesn't have the equivalent, thus porting > existing code to using json-parse-string might be difficult. I also stumbled on this problem when trying to port existing code to native JSON. It's kind of surprising, considering lists are more common in Elisp, and there's no JSON data structure that would correspond to them (so I can't simply return a different format from the backing server process, I'll have to convert).