microsoft / kiota-serialization-json-ruby

Kiota serialization provider implementation for Ruby and JSON
https://aka.ms/kiota/docs
MIT License
1 stars 4 forks source link

Improve handling of null values (fix #8) #13

Closed j15e closed 1 year ago

j15e commented 1 year ago

Those changes improve the handling of null values for both payload and object collection deserialization.

It simply skips trying to parsing them as it would fail or return incorrect values.

This fixes the issue reported in #8 and I can now get a group response with a null value for ex. deleted_at_time:

image

From my understanding, the tests do not cover yet the get_collection_of_primitive_values and get_collection_of_object_values method although they are used in the ruby SDK. I think the same fix needs to be applied (and I did). But it would probably be nice to add tests for them but I don't have extra bandwidth to investigate that at this time.

Note: my editor also stripped some random extra spaces (I think it is better without them ๐Ÿงน).

Best regards ๐Ÿ‘‹

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication