use json serializers instead of constructing json responses in controllers