Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Y3F5R-0002vc-Mo for pgsql-bugs@arkaria.postgresql.org; Tue, 23 Dec 2014 02:20:37 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Y3F5R-0004Sv-5w for pgsql-bugs@arkaria.postgresql.org; Tue, 23 Dec 2014 02:20:37 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Y39yV-0006QL-0V for pgsql-bugs@postgresql.org; Mon, 22 Dec 2014 20:53:07 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Y39yQ-0005Mf-Qd for pgsql-bugs@postgresql.org; Mon, 22 Dec 2014 20:53:05 +0000 MIME-Version: 1.0 Subject: BUG #12320: json parsing with embedded double quotes To: pgsql-bugs@postgresql.org From: postgres@bt-r.com Date: Mon, 22 Dec 2014 20:52:48 +0000 Message-ID: <20141222205248.11503.72633@wrigleys.postgresql.org> X-Pg-Spam-Score: -1.9 (-) Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 12320 Logged by: Aaron Botsis Email address: postgres@bt-r.com PostgreSQL version: 9.4.0 Operating system: Mac OSX Description: postgres=# create table ct (data jsonb); CREATE TABLE postgres=# copy ct (data) from '/Users/aaron/Desktop/queries.json'; ERROR: invalid input syntax for type json DETAIL: Token "root" is invalid. CONTEXT: JSON data, line 1: ...1418066241619 AND <=1418671041621) AND user:"root... COPY ct, line 3, column data: "{"timestamp":"2014-12-15T19:17:32.505Z","duration":7.947,"query":{"query":{"filtered":{"filter":{"qu..." This is a sample of the JSON: {"timestamp":"2014-12-15T19:17:32.505Z","duration":7.947,"query":{"query":{"filtered":{"filter":{"query":{"query_string":{"query":"organization_id:[REDACTED] AND timestamp:(>=1418066241619 AND <=1418671041621) AND user:\"root\""}}}}},"from":0,"size":20,"timeout":10000,"sort":{"timestamp":{"order":"desc"}},"facets":{}},"organization_id":"[REDACTED]","indices":["logs.[REDACTED].20141209","logs.[REDACTED].20141208","logs.[REDACTED].20141215","logs.[REDACTED].20141210","logs.[REDACTED].20141213","logs.[REDACTED].20141214","logs.[REDACTED].20141211","logs.[REDACTED].20141212"],"type":"all","level":"info","message":""} -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs