Skip to content

Empty string is a legitimate dict key, but amfast ignores it #86

Description

@rwarren

See this complete example:

>>> from amfast.encoder import Encoder
>>> from amfast.decoder import Decoder
>>> encoder = Encoder(amf3 = True)
>>> decoder = Decoder(amf3 = True)
>>> encode = encoder.encode
>>> decode = decoder.decode
>>> decode(encode({"a": 1}))
{u'a': 1}
>>> decode(encode({"": 1}))
{}
>>> d = {"a": 1, "": 2}
>>> d
{'': 2, 'a': 1}
>>> decode(encode(d))
{u'a': 1}

I'm currently running AmFast==0.5.3-r546

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions