[racket] internal represent of array are incompatible between library json and bson (mongodb.plt)
HI Jay,
Glad to know BSON supporting sequence. It's cool. Thanks.
I have a servlet that translates JSON to BSON. So I need modify
write-json function with sequence support.
PS. About keyword #:limit in the mongo-collection-find, I suggest write
the cursor behavior into the document.
Have a nice day!
Haiwei
On 20 December 2012 14:19, Jay McCarthy <jay.mccarthy at gmail.com> wrote:
> In the mongodb package, an array is not represented by a vector. An
> array is any sequence of bson values. The decoder will only produce
> vectors, but the encoder will accept any sequence. I think a vector is
> clearly superior since it corresponds more to the fixed-sized, indexed
> array described by the BSON format.
>
> Jay
>
> On Wed, Dec 19, 2012 at 10:50 PM, Haiwei Zhou <highfly22 at gmail.com> wrote:
> > Hi,
> >
> > In the library json, array is represented as list. But in the
> mongodb.plt,
> > array is represented as vector. The bson is almost the same as json in
> > concepts. If we can make json compatible, it's easy to translate json to
> > bson and vice versa.
> >
> > I would like to submit patch that makes both list and vector works in
> the
> > json library and mongodb.plt.
> >
> > Regards,
> > Haiwei
> >
> > ____________________
> > Racket Users list:
> > http://lists.racket-lang.org/users
> >
>
>
>
> --
> Jay McCarthy <jay at cs.byu.edu>
> Assistant Professor / Brigham Young University
> http://faculty.cs.byu.edu/~jay
>
> "The glory of God is Intelligence" - D&C 93
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20121220/a8eeda66/attachment-0001.html>