From 5304fc0d1cdaa2dbfe52c61dc01e3dcab2590a1d Mon Sep 17 00:00:00 2001 From: Rakshith Bhyravabhotla Date: Wed, 3 Mar 2021 16:18:46 -0800 Subject: [PATCH 1/2] null to read me --- sdk/core/azure-core/README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sdk/core/azure-core/README.md b/sdk/core/azure-core/README.md index eade6666623c..d2589cae59b4 100644 --- a/sdk/core/azure-core/README.md +++ b/sdk/core/azure-core/README.md @@ -179,6 +179,17 @@ class MyCustomEnum(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): BAR = 'bar' ``` +#### Null Sentinel Value + +A falsy sentinel object which is supposed to be used to specify attributes +with no data. This gets serialized to `null` on the wire. + +```python +from azure.core.serialization import NULL + +assert bool(NULL) is False +``` + ## Contributing This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have From 03b6e2074419c25fad8c63b82167c67a004c62c5 Mon Sep 17 00:00:00 2001 From: Rakshith Bhyravabhotla Date: Wed, 3 Mar 2021 16:23:54 -0800 Subject: [PATCH 2/2] Update sdk/core/azure-core/README.md --- sdk/core/azure-core/README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sdk/core/azure-core/README.md b/sdk/core/azure-core/README.md index d2589cae59b4..09235c818d70 100644 --- a/sdk/core/azure-core/README.md +++ b/sdk/core/azure-core/README.md @@ -188,6 +188,10 @@ with no data. This gets serialized to `null` on the wire. from azure.core.serialization import NULL assert bool(NULL) is False + +foo = Foo( + attr=NULL +) ``` ## Contributing @@ -209,4 +213,4 @@ or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. -[package]: https://pypi.org/project/azure-core/ \ No newline at end of file +[package]: https://pypi.org/project/azure-core/