While there are different ways to create JSON output, this is a sample of how it looks when Midas V5 generates data from IBM Notes, including Notes rich text aand images. Please note that the formatting is due to JSONLint where I was validating the output, as a long stream of JSON is not too identifiable, and Midas defaults to unformatted JSON because it is is more efficient. The top is a screen capture pf the first of the four documents from the search results. The bottom is the JSON output for that document, though it is truncated on the right. You might notice that the rich text image is rendered in-line, allowing the calling program to forego any reference back to the source, That is due to the DataImages paramter I wrote about previously.
The full agent (full text search in Curb Appeal database for 'Lyndhurst'):
Dim fullstr As String
Dim gColl As New GeniiCollection
Dim txtstr As String
Call gColl.AddByFTSearch("", "CurbAppeal.nsf", "Lyndhurst", "")
On Event ActOnText From gColl Call ActOnText
Call gColl.GenerateJSON("", |DataImages='32000' OutputToEvent='Yes' charset="iso−8859‒1"|)
Print "Content-Type: message/rfc822"
Sub ActOnText(Source As GeniiCollection, textstr As String)
fullstr = fullstr+textstr
Copyright © 2013 Genii Software Ltd.
Tags: Lotus Notes JSON Midas LSX Midas V5