SNAPPS' Troy Reimer donates LotusScript JSONWriter and JSONReader to Lotus Community
Category NoneTo steal a post from Viktor while I was gone...
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. A link to this download is now visible at JSON.org and it's been uploaded to and documented at OpenNTF.org
Now the back story. Troy developed the JSONReader class while we were busy developing templates for Quickr, thinking we would need it to do some of the processing. We had to write it from scratch, which is why we didn't just use an earlier open source one that had been on OpenNtf.org for a while. Turns out we didn't need it, but that it and a Writer class would be quite useful in Domino development later on. So he kept working on it part time, adding wrappers, adding objects, "polishing the apple" so to speak. When it was finished, after a lot of testing, we decided it should simply be donated as open source. We hope you find it useful!

Comments
It's not the LESSER GPL, which would allow me to release YOUR source code, but not mine. It's the formal, full, viral GPL, which necessitates that my release be just as open as yours.
For that reason, I didn't even download the library.
Posted by Nathan T. Freeman At 09:20:34 PM On 02/01/2008 | - Website - |
Posted by Rob Novak At 10:36:43 PM On 02/01/2008 | - Website - |
Would work really really well when bolted on to CouchDB . . .
{ Link }
Posted by Alan Bell At 08:10:49 AM On 02/02/2008 | - Website - |
Where in the world are you, by the way? It's the 1st Feb where I am ...
Posted by Julian Woodward At 09:58:27 AM On 02/02/2008 | - Website - |
Posted by Troy Reimer At 11:20:11 AM On 02/02/2008 | - Website - |