Custom JSON Transforms : Update sample code

The 'registerTransform' method has been removed, and there is a new
way to register a custom JSON transform.