-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add utility function to_json_dict
#77
Conversation
CHANGELOG.rst
Outdated
Version 11.7 | ||
============ | ||
|
||
* Add utility function ``to_json_dict`` to convert a dict to a JSON dict. `#76 <https://github.com/iqm-finland/iqm-client/pull/76>`_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR #77
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
return JSONEncoder.default(self, o) | ||
|
||
|
||
def to_json_dict(obj: dict[str, Any]) -> dict: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it supposed to be used anywhere in iqm-client
or just for the users? If for users, there should probably be an example in readme or docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not used anywhere in iqm-client, and it is not really intended for users as such, but rather for integrators.
First use will be in qiskit-on-iqm.
I added a short paragraph of it in integration guide.
The function can be used to sanitise data (e.g. circuit metadata) before sending it IQMClient.