LotusScript JSONReader and JSONWriter from SNAPPS
Troy Reimer at SNAPPS has created LotusScript classes for parsing and creating JSON text. These classes are contained within five script libraries. There is a JSONReader and a JSONWriter class together with some wrapper classes including JSONArray and JSONObject. The JSONWriter class is really cool. You can pass it basically anything Notes data related and let it create the JSON for you. This is really handy for passing a NotesDocumentCollection to the class and let it return perfect JSON to the browser or whatever called it.
This class provides two ways of outputing JSON text. The first is to pass an array, list, NotesDocument, NotesDocumentCollection, NotesView, NotesViewEntryCollection, or NotesViewEntry to the ToJSON method. This will render the object as JSON. If the object is a type of view object, the output will be taken from the column values. The output data is basically the same as the properties/values of NotesViewEntry. If the object is a document, its output follows the NotesDocument properties/values.
Troy has wrapped the code in a Notes database and the download can be found here. UPDATE! The link to this download is now available at JSON.org and at OpenNTF.org
Print This Post
Thank you for reading this post. You can now Read Comment (1) or Leave A Trackback.
Post Info
This entry was posted on Friday, January 25th, 2008 by Viktor Krantz and is filed under SNAPPS, Ajax, JSON, Domino. Tagged with:You can follow any responses to this entry through the Comments Feed. You can Leave A Comment, or A Trackback.
Previous Post: Lotusphere 2008 is over, see you in 2009 »
Next Post: Dojo data for Domino »
Read More
Related Reading:- Collaboration University 2008
- Want to learn more about the Dojo Toolkit?
- Find your Twitter friends’ friends with Twubble
- Rock, Chalk, Champions
- Dojo Toolkit 1.1 is released
- Happy Saint Patrick’s Day from a Swede
- LotusScript and JSON, living together
- My album cover
- Dojo Grid with Domino Views
- ComboBox & FilteringSelect for Domino

January 28th, 2008 02:45
great stuff! thanks for sharing!