1
votes

I'm working on a custom control that will be fed by JSON content and I'm trying to find the best approach to produce and consume it.

Let say the JSON could be from:

  1. Notes View (all documents)
  2. Notes View (subset of documents based on a category or filter)
  3. Notes Document Collection (from database.Search or database.FTSearch)

What I have on my mind is to define some Custom Properties where I can define:

  • URL that produces the JSON
  • Object
  • etc.

So far I'm considering:

  1. REST Service control from ExtLib
  2. XAgent that produces JSON
  3. Domino URL ?ReadViewEntries and OutputFormat=JSON

Does anyone knows if the JSON object loaded in memory has a size limit?

Any suggestion will be appreciated.

3
There are a couple of options to transform a document to a JSON object. You might want to read this (dontpanic82.blogspot.com/2010/01/…) for inspiration. Depending on your application you should also definitely test it with large(r) result sets.Mark Leusink
Thanks Mark, I'm using Tommy Valand implementation against database.search in a couple of applications. However, here I'm trying to work against Notes Views or Document Collections easily defined from Custom Properties on my Custom Control. One limitation I found with database.search or FTSearch is that by default only returns 5000 documents.PSolano
That limit can be changed by adding FT_Max_Search_Results=n to the notes.ini. Set it to 0 to remove the limit.Mark Leusink
Thanks Mark, unfortunately this is at server level and not at application level. Do you know the if reading JSON content from URL has a size limit at Server or Browser Level?PSolano

3 Answers

4
votes

Definitely go for the REST Service control from the Extension Library, offers by far the best combination of flexibility vs performance vs development time.

Matt

2
votes

What about creating the JSON in the view itself and then just read the column values? http://www.eknori.de/2011-07-23/formula-magic/

1
votes

If you want to parse the json object using ssjs, you can fetch it using an URLConnection and put the resulting object into a repeat control using the eval statement.