« When the cat's away, apparently the mice write nice technical articles | Main| Congratulations to Binary Tree on hiring Bob Balaban »

SNAPPS' Troy Reimer donates LotusScript JSONWriter and JSONReader to Lotus Community

QuickImage Category None
To 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

Gravatar Image1 - Rob, I saw this the other day, and I noticed that the library is published under the full GPL v3. Which, if my understanding is correct, means that I can't use it to facilitate code released under anything by the GPL.

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.

Gravatar Image2 - I can fix that - it was just a copy/paste of text we've used before. It'll be Apache 2. It's a gift, no strings attached.

Gravatar Image3 - ooh, nice.
Would work really really well when bolted on to CouchDB . . .
{ Link }

Gravatar Image4 - @3 - oh yes, very good point.
Where in the world are you, by the way? It's the 1st Feb where I am ...

Gravatar Image5 - I've changed the license to the Apache 2.0 license. The downloads at both sites have been updated to reflect the change. I upped the version to 1.0.1 but there is no change to the classes.

Calendar

Be With the Band

Follow me on Twitter!


Opt in to receive Rob's semi-regular newsletter about Quickr, Sametime, Free Stuff and Conferences. Just enter your email address below, you can unsubscribe at any time.

Subscribe to my newsletters...
Email:

On With The Show

Here are all of the SNAPPS templates for Lotus Quickr

Demos:
QActivities Demo
QAnnounce Demo
QContacts Demo
QIdeas Demo
QIssues Demo
QMeeting Demo
QPhotos Demo
QPresent Demo
QProject Demo
QSite Demo
QSurvey Demo

Template Updates Coming Soon...

DOWNLOAD NOW

Downloads: 95,255
Countries: 127
Read the article in Intranet Journal

Search

Googles

  • No Search Referers