I don't know how I missed that. I'll be learning blaze-builder then. Thanks!<br><br><div class="gmail_quote">On Thu, Sep 1, 2011 at 8:40 AM, Michael Snoyman <span dir="ltr"><<a href="mailto:michael@snoyman.com">michael@snoyman.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Actually, you can use fromValue[1] to get a Builder.<br>
<br>
[1] <a href="http://hackage.haskell.org/packages/archive/aeson/0.3.2.11/doc/html/Data-Aeson-Encode.html#v:fromValue" target="_blank">http://hackage.haskell.org/packages/archive/aeson/0.3.2.11/doc/html/Data-Aeson-Encode.html#v:fromValue</a><br>
<div><div></div><div class="h5"><br>
On Thu, Sep 1, 2011 at 6:33 PM, Michael Xavier <<a href="mailto:nemesisdesign@gmail.com">nemesisdesign@gmail.com</a>> wrote:<br>
> I've been meaning to take a look at blaze-builder anyways, but there is a<br>
> specific reason to use lazy ByteStrings. I'm using the Aeson library for<br>
> parsing/encoding JSON data. The encode function in that library chose lazy<br>
> ByteStrings as the output format. While performance on this project is a<br>
> factor, I'm reimplementing a project done in Ruby, so it won't be too hard<br>
> to best it in that dimension in Haskell, regardless of the output format ;)<br>
><br>
> On Thu, Sep 1, 2011 at 7:27 AM, Ertugrul Soeylemez <<a href="mailto:es@ertes.de">es@ertes.de</a>> wrote:<br>
>><br>
>> Michael Xavier <<a href="mailto:nemesisdesign@gmail.com">nemesisdesign@gmail.com</a>> wrote:<br>
>><br>
>> > I've just recently started learning how to use the enumerator<br>
>> > library. I'm designing a utility that parses a file where each line is<br>
>> > a JSON object. I've designed it to look like:<br>
>> ><br>
>> > source enumerator (enumHandle pretty much) -><br>
>> > chunk by lines (enumeratee) -><br>
>> > parse a line into an Object (enumeratee) -><br>
>> > filter objects based on a criteria (enumeratee) -><br>
>> > limit some keys from each object (enumeratee) -><br>
>> > encode the object into a lazy bytestring (enumeratee) -><br>
>> > output the file to stdout (iteratee)<br>
>><br>
>> If there is no specific reason to use lazy ByteStrings, I would suggest<br>
>> that you use a concept complementary to iteratees, the blaze-builder<br>
>> library for efficient stream output.<br>
>><br>
>><br>
>> Greets,<br>
>> Ertugrul<br>
>><br>
>><br>
>> --<br>
>> nightmare = unsafePerformIO (getWrongWife >>= sex)<br>
>> <a href="http://ertes.de/" target="_blank">http://ertes.de/</a><br>
>><br>
>><br>
>><br>
>> _______________________________________________<br>
>> Beginners mailing list<br>
>> <a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
>> <a href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a><br>
><br>
><br>
><br>
> --<br>
> Michael Xavier<br>
> <a href="http://www.michaelxavier.net" target="_blank">http://www.michaelxavier.net</a><br>
> LinkedIn<br>
><br>
> _______________________________________________<br>
> Beginners mailing list<br>
> <a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
> <a href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a><br>
><br>
><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Michael Xavier<br><a href="http://www.michaelxavier.net" target="_blank">http://www.michaelxavier.net</a><div><a href="http://www.linkedin.com/pub/michael-xavier/13/b02/a26" target="_blank">LinkedIn</a></div>
<br>