Davs Rants and Random Thoughts

January 30, 2007

New Tools Release

Filed under: yui, ajax, javascript, code, Yahoo! — Dav Glass @ 9:21 am

I have packaged up a new release of my YAHOO.Tools package. The new release contains a couple of bug fixes, but also adds support for JSON encoding and parsing.

I have included a modified version of Douglas Crockford’s JSON parser that doesn’t mess with the Object prototypes.

Examples:
http://blog.davglass.com/files/yui/tools/
http://blog.davglass.com/files/yui/tools/json.php

Source:
http://blog.davglass.com/files/yui/tools/tools.js

Min Source:
http://blog.davglass.com/files/yui/tools/tools-min.js

Docs:
http://blog.davglass.com/files/yui/docs/?type=tools

Let me know what you think 8-)

Add to:
| Digg it | Slashdot | Y! MyWeb

5 Responses to “New Tools Release”

  1. MyAvatars 0.2 Jeroen Sen Says:

    Dav,

    Is there a reason why you implemented the JSON parser of Douglas Crockford into your tools lib? The original Connection Manager accepts string’s so those can be used to construct strings, arrays and objects. Or is the originalYUI lib lacking some methods (like the decode method you added) ?

    Hope to hear your thoughts.

    Kind regards,

    Jeroen

  2. MyAvatars 0.2 Dav Glass Says:

    Jeroen –

    I included both a parse and an encode as well as a Date fixer..

    The Connection Manager does a “serialization” of form objects, the JSON encoder is a totally different beast.

    With the JSON encoder, I can un/serialize a JavaScript object, so I can parse/encode data to be sent back and forth from the server without a form 8-)

    I included the date fixer because of JSON’s inability to properly handle dates..

    The main reason for “rebuilding” Crockford’s JSON parser, was that I don’t like having something “mess” with the built in JavaScript objects ..

    Hope that answers your question 8-)
    Dav

  3. MyAvatars 0.2 Jeroen Sen Says:

    Yep, that answers my question just fine! Think I’m gonna rebuild my app, remove the dojo and add (once again) some YUI-sugar.

    Thanks!

    Btw, nice bike! :D

  4. MyAvatars 0.2 .jon Says:

    Hi,thanks for allowing to put your tools into my own toolshed.I just leeched the api-docs with wget, but that is always a task, that gives me more files, than I wanted, and I guess, you’d prefer less traffic too. Would it be possible to offer an archive of your tools ? Maybe even mirroring the YUI path-structure ?Any plans to add somemore tools ? Like a UUID generator. There is one here: http://www.af-design.com/resources/javascript_uuid.php but it would be nice to have it inside YUI. It may not be feasible, however, since it is pretty large, but since you are a geek (and I am not) maybe you could so something similare ? The above code is GPL, so you’d need to roll your own I guess.Oh, and how about a Preview Button for the comment section here ;-) ?

  5. MyAvatars 0.2 Phoebe Bright Says:

    You are my star for the day, no week!  Just used your JS to convert an unordered list into a YUI treeview for a plugin I am developing to use YUI in expression engine.Many many thanks.

Leave a Reply

© 2008 Dav Glass - All content is mine, except comments. Comments are the property of the poster. I speak for no person or company.
Can you tell me what this says? 01000100 01100001 01110110 01101001 01100100 00100000 01000111 01101100 01100001 01110011 01110011