Skip to content

Updated Shadow sample to allow clearing properties by passing null #379

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

Merged
merged 2 commits into from
Feb 17, 2022

Conversation

TwistedTwigleg
Copy link
Contributor

Description of changes:

Modifies the Shadow sample to show how to clear properties, either individually or by clearing the entire state. Now if you enter null it will clear the shadow_property property in the Shadow document, and if you enter clear_shadow it will clear all the fields in desired and reported.

Also adjusted code for printing the reported shadow updated so it does not get a segmentation fault when null is returned.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@TwistedTwigleg TwistedTwigleg merged commit 9e7c9aa into main Feb 17, 2022
@TwistedTwigleg TwistedTwigleg deleted the ShadowNullIsValid branch February 17, 2022 20:25
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.

2 participants