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: JSON Parsing Edge Case Date: Thu, 10 May 2018 16:48:05 -0700 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1525996012 11217 195.159.176.226 (10 May 2018 23:46:52 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 10 May 2018 23:46:52 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 11 01:46:48 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 1fGvGp-0002pm-PX for ged-emacs-devel@m.gmane.org; Fri, 11 May 2018 01:46:47 +0200 Original-Received: from localhost ([::1]:36059 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGvIx-0006WI-3Q for ged-emacs-devel@m.gmane.org; Thu, 10 May 2018 19:48:59 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39963) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGvIJ-0006WC-MJ for emacs-devel@gnu.org; Thu, 10 May 2018 19:48:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fGvIG-0005gr-LY for emacs-devel@gnu.org; Thu, 10 May 2018 19:48:19 -0400 Original-Received: from mail-pf0-x234.google.com ([2607:f8b0:400e:c00::234]:35190) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fGvIG-0005g4-FJ for emacs-devel@gnu.org; Thu, 10 May 2018 19:48:16 -0400 Original-Received: by mail-pf0-x234.google.com with SMTP id x9-v6so1813314pfm.2 for ; Thu, 10 May 2018 16:48:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=sB8IOMfQSQtEDjcHr63Zj0Yhq4qW6XcJlobBjzx6v+g=; b=MD03W4diR2rYmNIq/wdiJ3z+LCSHl+WHCwGFUgnRpcTfvWD27KHSzQ+VyUGp5IP/8y U2vUtFlbZ+htIH+uSHEJXY4QgY7uwhZuUrWopi31oV9d6o3hQj23eEs2WNKkXefBosIA jFH41oG4M1z2uddO5Qua3Qze1aAv4GbBzBuojEv04oa/d2JCtQC6coAl40Ewb5pHNMO9 KP3XvanwKoNXS+IcuezinqRX/qjov7iMP9Dsa+ntiDvmfK3oVeiNKZ2B32TOnzCzDL91 SDEjx65ZTruU1Oj0e+OzK/M7EJjR2rpYWKBlt60H8ElNJSvW89Ufp8g5S7yxJIt8Mdyl ioAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=sB8IOMfQSQtEDjcHr63Zj0Yhq4qW6XcJlobBjzx6v+g=; b=onnantnitioGI1s8SdfJ7rrdXz4+uMTL4HM/LxFJ2ozdSRpTAZJs5S3C6WmN+ShrLx 9lf1FlpVRFkqA1nYJutZixU2+CXJrxztODpNF17jfbZvwlqwrwnSNhp41B4+HzFDbI6j azDXIrUG9Z3PihTdagFGDaS3LB1xPSXkE1g8yWgO78zS/5JOYUXJpMxIQLdFZvtRCrlc kwK45sQ2Ir/L1721JG0OofDhWZ1b2eZ4p8VtTUMqX926DZQXf/LE7nE3JRqhApM93fOH 9s16fQBIbAKEuUG036vB2edJl0oC4+Aft4qZySITR4aRF8QA82PHQ5pmVC/luGW5/0Cp uRfQ== X-Gm-Message-State: ALKqPweIWn/5AetrtUARYZjAKccwJEyca8BXJFYsHWcYAsoqHKnbFeK5 XbN7CXkeKacFepaFk4TLWeOFqp8AjfU= X-Google-Smtp-Source: AB8JxZpidXcCQQSadhkEsa8+xfbwHOazLErMEdPRhO75nscMMUbUJmcnl0kg3pPg7US6AbQzAVAPNQ== X-Received: by 2002:a62:93c8:: with SMTP id r69-v6mr3186027pfk.59.1525996091927; Thu, 10 May 2018 16:48:11 -0700 (PDT) Original-Received: from retriever.mtv.corp.google.com ([100.98.8.133]) by smtp.gmail.com with ESMTPSA id c11-v6sm3540367pfh.15.2018.05.10.16.48.06 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 May 2018 16:48:07 -0700 (PDT) Original-Received: by retriever.mtv.corp.google.com (Postfix, from userid 13930) id 9BF731A0CFA; Thu, 10 May 2018 16:48:05 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::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:225211 Archived-At: 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") the list structure is really (quote . "1") but the elisp reader has turned that symbol "quote" into an "'" --