Skip to content

Convert None to null when serializing expression arguments #690

@iocentos

Description

@iocentos

I've spent a good two full days trying to figure why it was not working.

We have a custom function attached to the window object that I was trying invoke with a deep dictionary object. While debugging I realized that when the framework serializes expression arguments it converts None to undefined instead of null.

In our case we explicitly check for null (inside the browser) and that was the reason it was failing.

I understand that you have both options (undefined and null) in javascript world while there is only None in python world. So I guess you had to choose one or another. My question is if it was the right choice here.

Also, it is a very subtle issue and it is not documented anywhere.

Below is the code in question.

return dict(v="undefined")

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