-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Simple json encoding example does not export all data properly #71
Comments
Can you show a bit of code to illustrate how you are dumping both? While I do have some yaml loading/dumping in the code, I haven't tested with json loading/dumping so far. The yaml examples can be found here, they're used by the test system: https://github.com/WoLpH/mt940/blob/develop/tests/test_sta_parsing.py#L30-L39 My guess would be that the easiest way to get it working is by overriding |
I am using examples from README. Literally as-is. |
You're right. That demo is lacking quite a bit. I've updated the code in the readme to be a bit more useful :) Does that help? |
Thanks. No, it's still not work properly as all the dates ( |
I've created a json encoder which should handle all of the types for you. That should help a bit :) import json
import mt940
transactions = mt940.parse('tests/jejik/abnamro.sta')
print(json.dumps(transactions, indent=4, cls=mt940.JSONEncoder)) |
That works perfect. Thank you! |
I am trying to parse my bank's MT940 data with your library and example of JSON encoding is producing different results than "plain" data dump. This is what I see with plain dump:
and this is what JSON dump example outputs:
And relevant part of the source file:
The text was updated successfully, but these errors were encountered: