You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Dave Cottlehuber (JIRA)" <ji...@apache.org> on 2014/02/20 10:32:19 UTC
[jira] [Commented] (COUCHDB-1294) Use Jiffy for JSON serialization
[ https://issues.apache.org/jira/browse/COUCHDB-1294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13906803#comment-13906803 ]
Dave Cottlehuber commented on COUCHDB-1294:
-------------------------------------------
>From recent discussion on user@ we should get jiffy in and also confirm if we should reject JSON with duplicate names inside objects. Per [JSON spec], ` The names within an object SHOULD be unique.`.
{{{code}}}
(term@akai)16> jiffy:decode(<< "{\"foo\":\"bar\", \"few\":\"bar\"}" >>).
{[{<<"foo">>,<<"bar">>},{<<"few">>,<<"bar">>}]}
(term@akai)17> jiffy:decode(<< "{\"foo\":\"bar\", \"foo\":\"bar\"}" >>).
{[{<<"foo">>,<<"bar">>},{<<"foo">>,<<"bar">>}]}
{{{code}}}
[JSON spec]: http://tools.ietf.org/html/rfc4627#section-2.2
> Use Jiffy for JSON serialization
> --------------------------------
>
> Key: COUCHDB-1294
> URL: https://issues.apache.org/jira/browse/COUCHDB-1294
> Project: CouchDB
> Issue Type: Improvement
> Components: Database Core, HTTP Interface
> Affects Versions: 1.2
> Reporter: Paul Joseph Davis
> Labels: json
> Attachments: 0001-Import-Jiffy.patch, 0002-Remove-old-ejson-app.patch
>
>
> Jiffy is a NIF for JSON serialization. I wrote it quite a while ago but have finally gotten around to writing the integration for CouchDB. This is a direct replacement for ejson which does much less parsing in C. Jiffy is as close to mochijson2 (with our custom objects) as humanly possible. At the moment there are no known differences in output. Jiffy itself has been tested fairly extensively by a couple different groups so I'm fairly confident there aren't any major bugs left.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)