Skip to content

[bug] using custom JSON decoder #238

@KS-HTK

Description

@KS-HTK

From python 3.9 onward support for the encoding keyword has been dropped. While this is not an issue with geojson, it becomes an issue if a custom JSON Encoder/Decoder is used.

codec.py contains:

try:
    import simplejson as json
except ImportError:
    import json

this is an issue because the custom JSON Encoder/Decoder is subclassed of the python json encoder not the version from simplejson and since they are not compatible, if simplejson is present an issue will be thrown when simplejson tries to call the custom encoder with keywords it does not support.

This was opened as an issue with simplejson and they do not plan to be compatible with the standard json implementations so using it as a drop in replacement seems like a bad idea.
simplejson/simplejson#341

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