Skip to content

json.dumps allows NaN values in JSON by default, which is unparseable as JSON #8

@kindjar

Description

@kindjar

Python's json.dumps method encodes NaN into JSON output as NaN, which is not actually valid JSON, and the API's parser can't process that, so the client will get back an HTTP 400 error if a NaN value is accidentally included in the request. The python library should specify allow_nan = False in the json.dumps call so that the calling code gets a ValueError instead of a strange API error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions