Skip to content

Incompatible IntEnum encoding #121

Description

@lVlayhem

python-rapidjson behaves differently from json and ujson when encoding IntEnums.

import enum
import json
import ujson
import rapidjson

class SomeInt(enum.IntEnum):
    val = 123


print([json.dumps(SomeInt.val), ujson.dumps(SomeInt.val), rapidjson.dumps(SomeInt.val)])

This code produces:
['123', '123', 'SomeInt.val']

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions