Serving up JSON Data from a SharePoint Application Page Pseudo Service


Sometimes, the SharePoint JSOM is just too unwieldy.

So on a recent project I needed to conjure up SharePoint group information, and for each of these groups also the users which are group members. I wanted this data in JSON format since I’m using knockoutjs for the UI and presentation.

After taking a look at the JSON API for groups, I resolved to find a better easier way of building this data, essentially what I want is a simple array of JSON objects representing groups and users in those groups, like so;

Easy and straight-forward, but I didn’t want to have to write a bunch of grungy code to do this either. I like the SharePoint JSOM, but for a lot of data-retrieval type tasks, the interface is just too chatty and iterative, it has an imperative rather than declarative feel to it.

So, the solution to this for me was to…

View original post 385 more words