Title: Dumping Python dict yields invalid HSD · Issue #7 · dftbplus/hsd-python · GitHub
Open Graph Title: Dumping Python dict yields invalid HSD · Issue #7 · dftbplus/hsd-python
X Title: Dumping Python dict yields invalid HSD · Issue #7 · dftbplus/hsd-python
Description: Since keys in Python dicts are case sensitive, one can easily build a dict that has no valid HSD representation. Unfortunately, this is exactly what happens with the implementation in this repo: >>> import hsd >>> print(hsd.dumps({'key':...
Open Graph Description: Since keys in Python dicts are case sensitive, one can easily build a dict that has no valid HSD representation. Unfortunately, this is exactly what happens with the implementation in this repo: >>...
X Description: Since keys in Python dicts are case sensitive, one can easily build a dict that has no valid HSD representation. Unfortunately, this is exactly what happens with the implementation in this repo: &g...
Opengraph URL: https://github.com/dftbplus/hsd-python/issues/7
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Dumping Python dict yields invalid HSD","articleBody":"Since keys in Python dicts are case sensitive, one can easily build a dict that has no valid HSD representation. Unfortunately, this is exactly what happens with the implementation in this repo:\r\n\r\n```python\r\n\u003e\u003e\u003e import hsd\r\n\u003e\u003e\u003e print(hsd.dumps({'key': 0.0, 'Key': 1.0}))\r\nkey = 0.0\r\nKey = 1.0\r\n\r\n```\r\n\r\nThe preferable solution would be an exception from the serializer or a way to normalize a dict for HSD dumping.\r\n\r\nTogether with #6, the deserialization of the above HSD then yields `{'key': [0.0, 1.0]}`, so it cannot even be identified as invalid HSD.","author":{"url":"https://github.com/awvwgk","@type":"Person","name":"awvwgk"},"datePublished":"2020-04-06T22:53:32.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/7/hsd-python/issues/7"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:cb336c37-b425-069c-88bc-4d66358c640a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E18C:299194:8CF65C:BE8A2D:6A4D6ED8 |
| html-safe-nonce | e69df367a05410b6ffbc7d156eb280afdf30feb8658bc96a7de315093c137f79 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMThDOjI5OTE5NDo4Q0Y2NUM6QkU4QTJEOjZBNEQ2RUQ4IiwidmlzaXRvcl9pZCI6IjQzMzMyMDgwNzA1NTA2MDY5NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 244b296e0d2fc7325ff3489bb7047a5969bd1220f9d755d15312c7261797a2bf |
| hovercard-subject-tag | issue:595476879 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/dftbplus/hsd-python/7/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b6eef24d62345ba029421912e8bd8ee93ac9c84e3e7b4712a26d8ccf6e1adc8f/dftbplus/hsd-python/issues/7 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b6eef24d62345ba029421912e8bd8ee93ac9c84e3e7b4712a26d8ccf6e1adc8f/dftbplus/hsd-python/issues/7 |
| og:image:alt | Since keys in Python dicts are case sensitive, one can easily build a dict that has no valid HSD representation. Unfortunately, this is exactly what happens with the implementation in this repo: >>... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | awvwgk |
| hostname | github.com |
| expected-hostname | github.com |
| None | c78260c7b3f4ac4b0356c8208537f05406a3a2d46a9ec3f735b372dcc519c39e |
| turbo-cache-control | no-preview |
| go-import | github.com/dftbplus/hsd-python git https://github.com/dftbplus/hsd-python.git |
| octolytics-dimension-user_id | 24522763 |
| octolytics-dimension-user_login | dftbplus |
| octolytics-dimension-repository_id | 237852279 |
| octolytics-dimension-repository_nwo | dftbplus/hsd-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 237852279 |
| octolytics-dimension-repository_network_root_nwo | dftbplus/hsd-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 399fff412f48461d435721c009efc17ea44be72f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width