Skip to content

Add json deserialization convenience method#293

Merged
wcs1only merged 6 commits into
dapr:masterfrom
wmeints:features/json-serialization-helper
Nov 5, 2021
Merged

Add json deserialization convenience method#293
wcs1only merged 6 commits into
dapr:masterfrom
wmeints:features/json-serialization-helper

Conversation

@wmeints

@wmeints wmeints commented Nov 4, 2021

Copy link
Copy Markdown
Contributor

Description

Adds the json() method to responses that contain data to deserialize the content to a dictionary.
This should make the convenience layer a little bit easier to work with.

Issue reference

Fixes #88

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests

@wmeints
wmeints requested review from a team as code owners November 4, 2021 19:31
Comment thread tests/clients/test_dapr_grpc_client.py Outdated
@codecov

codecov Bot commented Nov 5, 2021

Copy link
Copy Markdown

Codecov Report

Merging #293 (f0d1ca6) into master (33e7d48) will increase coverage by 0.09%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #293      +/-   ##
==========================================
+ Coverage   89.38%   89.47%   +0.09%     
==========================================
  Files          52       52              
  Lines        2147     2156       +9     
==========================================
+ Hits         1919     1929      +10     
+ Misses        228      227       -1     
Impacted Files Coverage Δ
dapr/clients/grpc/_response.py 95.30% <100.00%> (+1.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 33e7d48...f0d1ca6. Read the comment docs.

@wmeints wmeints changed the title Add json deserialization convience method Add json deserialization convenience method Nov 5, 2021
@wcs1only
wcs1only merged commit 18a609a into dapr:master Nov 5, 2021
berndverst pushed a commit to berndverst/python-sdk that referenced this pull request Nov 5, 2021
* Add json deserialization convience method

* Fix flake8 errors

* Fix typing errors

* Revert change to test to fix CI

* Add test for json method in bulk state item

* Fix linting error
wcs1only pushed a commit that referenced this pull request Nov 5, 2021
* update proto and bump version to 1.4.0rc.1

* Add json deserialization convenience method (#293)

* Add json deserialization convience method

* Fix flake8 errors

* Fix typing errors

* Revert change to test to fix CI

* Add test for json method in bulk state item

* Fix linting error

* don't use dev version in release branch

Co-authored-by: Willem Meints <[email protected]>
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

Successfully merging this pull request may close these issues.

Support default json serializer in DaprClient and add .json helper

3 participants