Skip to content

TypeError: {123: 456} is not JSON serializable #2356

@sam-s

Description

@sam-s

Stock JSON module can handle int-keyed dicts:

import json
print(json.dumps({123:456}))
==> {"123": 456}

Rapidjson cannot:

import rapidjson as json
print(json.dumps({123:456}))
==>
       import rapidjson as json
---->  print(json.dumps({123:456}))

TypeError: {123: 456} is not JSON serializable

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