Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4D8BB90A2 for ; Wed, 22 Feb 2012 19:48:15 +0000 (UTC) Received: (qmail 85224 invoked by uid 500); 22 Feb 2012 19:48:13 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 85182 invoked by uid 500); 22 Feb 2012 19:48:13 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 85168 invoked by uid 99); 22 Feb 2012 19:48:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Feb 2012 19:48:13 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Feb 2012 19:48:10 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id D6DE2335031 for ; Wed, 22 Feb 2012 19:47:49 +0000 (UTC) Date: Wed, 22 Feb 2012 19:47:49 +0000 (UTC) From: "Paul Joseph Davis (Resolved) (JIRA)" To: dev@couchdb.apache.org Message-ID: <1953923060.5817.1329940069881.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <2105855067.23919.1328876519495.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Resolved] (COUCHDB-1407) JSON encoding of number changes MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/COUCHDB-1407?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul Joseph Davis resolved COUCHDB-1407. ---------------------------------------- Resolution: Fixed Fix Version/s: 1.2 Sorry it took so long for me to get to this. Patch is on 1.2.x and master: http://git-wip-us.apache.org/repos/asf?p=couchdb.git;a=commitdiff;h=ba271a70b83c6df16af43204c2ba9f4d5ca89711 make check passes locally and a shell session shows it to be correct. > JSON encoding of number changes > ------------------------------- > > Key: COUCHDB-1407 > URL: https://issues.apache.org/jira/browse/COUCHDB-1407 > Project: CouchDB > Issue Type: Bug > Components: HTTP Interface > Affects Versions: 1.2 > Environment: Ubuntu 12.04 (alpha) > Reporter: Adam Lofts > Fix For: 1.2 > > Attachments: 0001-Only-validate-numbers-on-JSON-decoding.patch > > > JSON encoding of Number has changed from 1.0.2 to 1.2. JSON only defines Number but this change causes issues in my app because python decodes the number as an int in 1.2. > Test case: > PORT=5985 > curl -X DELETE http://localhost:$PORT/test-floats/ > curl -X PUT http://localhost:$PORT/test-floats/ > curl -X PUT http://localhost:$PORT/test-floats/doc1 -H "Content-Type: application/json" -d "{ \"a\": 1.0 }" > curl http://localhost:$PORT/test-floats/doc1 > Run against 1.0.2: > {"ok":true} > {"ok":true} > {"ok":true,"id":"doc1","rev":"1-78e61304147429d3d500aee7806fd26d"} > {"_id":"doc1","_rev":"1-78e61304147429d3d500aee7806fd26d","a":1.0} > Run against 1.2: > {"ok":true} > {"ok":true} > {"ok":true,"id":"doc1","rev":"1-78e61304147429d3d500aee7806fd26d"} > {"_id":"doc1","_rev":"1-78e61304147429d3d500aee7806fd26d","a":1} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira