Converts an object to a pretty-printed JSON string. This function can be helpful for debugging values when creating templates.