After the initial frustration with a locked down and undocumented Fuji scripted processor API I avoided them as much as possible. But sometime you just can't avoid them. I recently had a need to build a REST-like integration because the client app couldn't use SOAP, so scripted web services weren't an option. Since scripted REST services don't exist...yet, I needed to use a scripted processor to capture a POST request with JSON and return a JSON payload.
Let's get back to some more API changes in the ServiceNow Fuji release. Anyone who has done any integration work has most likely used JSONParser at least once. Unfortunately, this is yet another API that is not available in non-global application scopes.
I've been working with JSON payloads a lot lately for a number of integrations. One of these integrations stores payloads in a text field in ServiceNow. At times they can be large and a bit tough to review and troubleshoot so I looked for a quick way to get the string in a pretty format.