Mon 15 Mar 2021
When moving from X to Y, you must know about both X and Y
Wed 3 Mar 2021
From NSF to Oh Shiny!
Mon 1 Mar 2021
Eighteen years of blogging
Notes to JSON - Curb Appeal
Sun 15 Sep 2013, 09:10 PMTweet
by Ben Langhinrichs
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.
What has been said: