From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "T.V Raman" Newsgroups: gmane.emacs.devel Subject: Re: JSON Parsing Edge Case Date: Thu, 10 May 2018 19:30:28 -0700 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1526005727 5580 195.159.176.226 (11 May 2018 02:28:47 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 11 May 2018 02:28:47 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Emacs developers To: Noam Postavsky Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 11 04:28:42 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fGxnV-0001Km-20 for ged-emacs-devel@m.gmane.org; Fri, 11 May 2018 04:28:41 +0200 Original-Received: from localhost ([::1]:36408 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGxpb-0000xW-Vj for ged-emacs-devel@m.gmane.org; Thu, 10 May 2018 22:30:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41981) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGxpV-0000xG-G9 for emacs-devel@gnu.org; Thu, 10 May 2018 22:30:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fGxpQ-0005kX-JU for emacs-devel@gnu.org; Thu, 10 May 2018 22:30:45 -0400 Original-Received: from mail-pl0-x234.google.com ([2607:f8b0:400e:c01::234]:37054) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fGxpQ-0005iP-DY for emacs-devel@gnu.org; Thu, 10 May 2018 22:30:40 -0400 Original-Received: by mail-pl0-x234.google.com with SMTP id f7-v6so2404372plr.4 for ; Thu, 10 May 2018 19:30:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=+terQU96yx9Fs5HhNPoZ2LkjK8Ohqy6EkajDEgyeCqM=; b=e4fEuxrACm6Gp6ZVKPEppC9f0RP9tZEQjA2eP0GDuuE/qOopMW0ljP/Ts5JyaZXog2 Q3RcbmdniH2yM91UKJqPPwmIENczJTOWhhEAybQzpI9TsMFyPvYcZzwmsoEaKAXrwc2f d+1R2DVzDgQaM0oLD2FXuVF8gQJaa1d1XnEbR5kYV+H5iwHTtz6H0BvsbJRzQmrum2GG rnDWlbEI/xFDhIMp9fKqRR42H7oF9NgXhwq/dD8rjFugYpgW4ymJdtg4VvmZEQ27NU33 QVsEdo/gMnP7g7VoJo7DGyDyS0gnOiZ6g/TpVQ0sm4NuuG7OEkUpRqU6LMHPYQKz30qh byAg== 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; bh=+terQU96yx9Fs5HhNPoZ2LkjK8Ohqy6EkajDEgyeCqM=; b=p7eoY7gYmcE8FOSrNmPNtMEF2P/06VGeEGSJYFU62PNUa7nWTi7Run6FNc1ornuBbb RrS241/e2hEK2kvYuCxHfztQJOsEz1zQLjKxt7gZuvrqyDtAYxjC6cBcXkWD6rKbdzd1 tOejmo4ySJVQQ03z1OYeSiRYoExzsT9H64Gc5ydMNOslT0l/qj8CSfbcBJhVUVxQlUpS E38JJsmDSzpXn14opWjs35QtepjEO/7ukmVE/29z8PUPBc5ebNPSeCyN8P2u82bMp81b KdG67q38yjZXJJoHT6gTsP+MtiJLfUidZol9phSLsUcHCpjnnn8APD0eaEkCfqoKQQt5 jv9Q== X-Gm-Message-State: ALKqPwcqBD8SDbXrXIhSmvbcMGDdkVenfBW2EfMVswLeDb7u5qejV6t1 ZZFGDEu4lfx9qKoebMS3bqzvI9GuLSA= X-Google-Smtp-Source: AB8JxZqAt+WJwbSiepdZdCCqfKUsUWs4oNg6DdbYXVOZBurMpPcrCiMWAreXrvbXJpVWKr3AXzKQ7w== X-Received: by 2002:a17:902:14d:: with SMTP id 71-v6mr3608851plb.275.1526005835954; Thu, 10 May 2018 19:30:35 -0700 (PDT) Original-Received: from raman-glaptop (c-24-4-174-65.hsd1.ca.comcast.net. [24.4.174.65]) by smtp.gmail.com with ESMTPSA id v15-v6sm4464049pfa.107.2018.05.10.19.30.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 May 2018 19:30:30 -0700 (PDT) In-Reply-To: (Noam Postavsky's message of "Thu, 10 May 2018 19:56:47 -0400") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c01::234 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:225215 Archived-At: Noam Postavsky writes: I meant json-read-string --apologies. json-parse-buffer needs the underlying emacs to be compiled with the json C module. > On 10 May 2018 at 19:48, T.V Raman wrote: >> The following happens with both json-read -- the elisp implementation >> as well as json-parse-string implemented in C -- >> >> Try this json fragment -- by typing it into an empty buffer: >> >> {"quote": "1"} >> >> The above is a json dict with one key -- "quote" -- with value 1. >> >> Parsing this into an emacs alist -- either with (json-read) or >> (json-parse-buffer) >> yields the following lisp structure -- >> >> ('. "1") > > With json-read, and (json-read-from-string "{\"quote\": \"1\"}"), I get > > ((quote . "1")) > > json-parse-string and json-parse-buffer don't seem to exist for me > (using the latest master branch). > --