Skip to content

JsonResponse makes it impossible to send literal null #11679

Closed
@zachmullen

Description

@zachmullen

The default value of the $data parameter for JsonResponse is null, but when it is set to null, the actual value sent in the response is in fact {}. This is problematic because it makes it impossible to send a literal value of null, which is valid JSON. The distinction is important, because in javascript {} evaluates truthy and null evaluates falsy.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions