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

Accept GeoJSON as dict not only as string #161

Open
SlowMo24 opened this issue Jul 4, 2024 · 2 comments
Open

Accept GeoJSON as dict not only as string #161

SlowMo24 opened this issue Jul 4, 2024 · 2 comments

Comments

@SlowMo24
Copy link
Collaborator

SlowMo24 commented Jul 4, 2024

          (Sidenote: I wonder why JSON is only supported as string and not as dict)

Originally posted by @matthiasschaub in #158 (comment)

@solo2307
Copy link

I got the same issue using ohsome-py API client when sending a request with bpolys as GeoJSON FeatureCollection:
TypeError: the JSON object must be str, bytes or bytearray, not dict

@SlowMo24
Copy link
Collaborator Author

I got the same issue using ohsome-py API client when sending a request with bpolys as GeoJSON FeatureCollection: TypeError: the JSON object must be str, bytes or bytearray, not dict

MR welcome.

Workaround would be to dump your dict as string using json.dumps(my_dict)

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

No branches or pull requests

2 participants