Skip to content

Incompatible IntEnum encoding #121

Closed

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']

Activity

  1. lelit commented on Mar 27, 2019

    @lelit
    Contributor

    Thanks for the report!

  2. lelit commented on May 11, 2019

    @lelit
    Contributor

    Solved in v0.7.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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