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

Use real json as output #1

Open
En3rGy opened this issue Oct 6, 2024 · 0 comments
Open

Use real json as output #1

En3rGy opened this issue Oct 6, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@En3rGy
Copy link

En3rGy commented Oct 6, 2024

Use json.dumps(...) to output today and tomorrow json. This will lead to valid json strings instead of strings containing ' instead of " and showing the u for unicode representation.

replace
self.help.set_output_sbc(self.PIN_O_PRICE_JSON_TODAY, priceinfo['today'])\ .set_output_sbc(self.PIN_O_PRICE_JSON_TOMORROW, priceinfo['tomorrow'])

by

self.help.set_output_sbc(self.PIN_O_PRICE_JSON_TODAY, json.dumps(priceinfo['today']))\ .set_output_sbc(self.PIN_O_PRICE_JSON_TOMORROW, json.dumps(priceinfo['tomorrow']))

@En3rGy En3rGy changed the title Use reals json for output Use real json as output Oct 8, 2024
@SvenBunge SvenBunge added the bug Something isn't working label Oct 9, 2024
@SvenBunge SvenBunge self-assigned this Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants