[HttpFoundation] Add ability to change JSON encoding options