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

Return Response as friendly public transport JSON #27

Open
1Maxnet1 opened this issue Jun 12, 2023 · 1 comment
Open

Return Response as friendly public transport JSON #27

1Maxnet1 opened this issue Jun 12, 2023 · 1 comment

Comments

@1Maxnet1
Copy link
Contributor

Currently when I print the response of the pyhafas client, I get a according object as defined in the types package. However I would like to retrieve the freindly public transport format JSON of e.g. an journey. Is that already possible (and I overlooked it somehow) or would it be feasible to implement ? I could also offer to submit a PR for that.

@1Maxnet1
Copy link
Contributor Author

1Maxnet1 commented Jul 7, 2023

I just experimented a bit with jsonpickle which seems to be able to do the trick. It serializes object graphs and even allows to deserialize them again. Would this be an option? I guess it makes sense to use an existing library instead of implementing something on our own. However one could also argue, that it makes more sense to keep this in the software, that makes use of pyhafas. Or this this a feature which could fit into pyhafas?

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

1 participant