Add a setJsonOptions method to JsonResponse to allow changing options after creation
Merge pull request #5680 from dlawrence/setJsonOptions

Add a setJsonOptions method to JsonResponse to allow late option changing