Tag Archive: JSON

Published in The View – Using JSON in XPages

I’ve written a new article for The View, Use JSON to Create Flexible, Scalable, and Easy-to-Use Data Storage in XPages.  As you might guess from the title, in the article I describe how to use JSON to create a flexible, scalable, and easy-to-use data storage in XPages.  I explain what JSON is, and give an example of how it can be used in XPages to store data that you might otherwise store in parent and child documents.  In this example, the JSON allows you to keep the data together within the parent document.  Of course JSON can be used for much more, this is just one example of how you can use it in XPages.  A sample application is included.  A subscription to The View is required to view the entire article.

Nifty JSON Generator

I like working with JSON.  Once you get the hang of it, it is a great way to handle data, easily get named values, etc.  Often when you are developing, you need lots of records.  Creating lots of records with many many values can be really tedious.  Enter the JSON Generator.  This is a simple, but fantastic site, that does just what it says.

On the left-hand side you can see the sample code to generate some JSON.  You can take it as-is or modify it.  Say your code calls for “business”, not “company”.  You don’t want “lattitude”, but you would like a few other values.  You can change the number of records created, too.  Modify the code on the left and click GENERATE.

Poof!  The right-hand side is now filled with lovely usable JSON with random values that you can use to test your code!