<div dir="ltr"><div><div><div>HI Jay,<br><br></div> Glad to know BSON supporting sequence. It's cool. Thanks. </div><div><br></div> I have a servlet that translates JSON to BSON. So I need modify write-json function with sequence support.<br>
<br></div><div>PS. About keyword #:limit in the mongo-collection-find, I suggest write the cursor behavior into the document.<br></div><div><br></div>Have a nice day!<br>Haiwei<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On 20 December 2012 14:19, Jay McCarthy <span dir="ltr"><<a href="mailto:jay.mccarthy@gmail.com" target="_blank">jay.mccarthy@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
In the mongodb package, an array is not represented by a vector. An<br>
array is any sequence of bson values. The decoder will only produce<br>
vectors, but the encoder will accept any sequence. I think a vector is<br>
clearly superior since it corresponds more to the fixed-sized, indexed<br>
array described by the BSON format.<br>
<br>
Jay<br>
<div><div class="h5"><br>
On Wed, Dec 19, 2012 at 10:50 PM, Haiwei Zhou <<a href="mailto:highfly22@gmail.com">highfly22@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> In the library json, array is represented as list. But in the mongodb.plt,<br>
> array is represented as vector. The bson is almost the same as json in<br>
> concepts. If we can make json compatible, it's easy to translate json to<br>
> bson and vice versa.<br>
><br>
> I would like to submit patch that makes both list and vector works in the<br>
> json library and mongodb.plt.<br>
><br>
> Regards,<br>
> Haiwei<br>
><br>
</div></div>> ____________________<br>
> Racket Users list:<br>
> <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
><br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
--<br>
Jay McCarthy <<a href="mailto:jay@cs.byu.edu">jay@cs.byu.edu</a>><br>
Assistant Professor / Brigham Young University<br>
<a href="http://faculty.cs.byu.edu/%7Ejay" target="_blank">http://faculty.cs.byu.edu/~jay</a><br>
<br>
"The glory of God is Intelligence" - D&C 93<br>
</font></span></blockquote></div><br></div>