From: bouda@edookit.com
To: pgsql-bugs@postgresql.org
Subject: BUG #12070: hstore extension: hstore_to_json_loose produces invalid JSON
Date: Wed, 26 Nov 2014 08:10:59 +0000
Message-ID: <20141126081059.15510.5034@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
The following bug has been logged on the website:
Bug reference: 12070
Logged by: Ondřej Bouda
Email address: bouda@edookit.com
PostgreSQL version: 9.4beta2
Operating system: Windows 7 64bit
Description:
The hstore_to_json_loose(hstore) produces an invalid JSON in the following
case:
SELECT hstore_to_json_loose(hstore(ARRAY ['name'], ARRAY ['1.'] :: TEXT
[]))
Output: {"name": 1.}
Expected:
either {"name": "1."}
or {"name": 1}
(the latter being the preferred one so that it produces the same JSON as
hstore_to_jsonb_loose(hstore))
The actual output is indeed incorrect as JSON does not permit `1.` - it must
be a string.
Tested with PostgreSQL 9.4 RC1 and still wrong.
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: bouda@edookit.com
Subject: Re: BUG #12070: hstore extension: hstore_to_json_loose produces invalid JSON
In-Reply-To: <20141126081059.15510.5034@wrigleys.postgresql.org>
References: <20141126081059.15510.5034@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox