Genii Weblog

Notes to JSON - Curb Appeal

Sun 15 Sep 2013, 09:10 PM



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'):
Option Public
Option Declare
Uselsx "*lsxrtc"

Dim fullstr As String

Sub Initialize
   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"
   Print ||
   Print fullstr
End Sub

Sub ActOnText(Source As GeniiCollection, textstr As String)
   fullstr = fullstr+textstr
End Sub


The images:

Screen capture of Notes document.


Screen capture of part of the JSON generated by the Midas LSX Version 5

Copyright © 2013 Genii Software Ltd.

What has been said:

No documents found