Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loads() returns inconsistent types #105

Open
medwig opened this issue Sep 11, 2017 · 1 comment
Open

loads() returns inconsistent types #105

medwig opened this issue Sep 11, 2017 · 1 comment

Comments

@medwig
Copy link

medwig commented Sep 11, 2017

python -c "import geojson; geojson.loads('{}').is_valid"
AttributeError: 'dict' object has no attribute 'is_valid'

If loads(x) succeeds it returns a geojson.feature.____ object, otherwise it returns the result of json.loads(x).

I recommend it always return a feature object.

@frewsxcv
Copy link
Collaborator

Sounds good to me, though we'll need to do a major version bump for this, which is fine

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

No branches or pull requests

3 participants