restapi.rest.response.ExtendedJSONEncoder.response

ExtendedJSONEncoder.response(*args, **kwargs)

Serialize the given arguments as JSON, and return a Response object with the application/json mimetype.

The jsonify() function calls this method for the current application.

Either positional or keyword arguments can be given, not both. If no arguments are given, None is serialized.

Parameters:
  • args (t.Any) – A single value to serialize, or multiple values to treat as a list to serialize.

  • kwargs (t.Any) – Treat as a dict to serialize.

Return type:

Response