Skip to content

Commit 1caf683

Browse files
committed
- adds javadoc comments for serializing null values parameters
1 parent 2af4aae commit 1caf683

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/main/java/com/microsoft/graph/serializer/DefaultSerializer.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ public DefaultSerializer(@Nonnull final ILogger logger) {
7272
/**
7373
* Creates a DefaultSerializer with an option to enable serializing of the null values.
7474
*
75+
* Serializing of null values can have side effects on the service behavior.
76+
* Sending null values in a PATCH request might reset existing values on the service side.
77+
* Sending null values in a POST request might prevent the service from assigning default values to the properties.
78+
* It is not recommended to send null values to the service in general and this setting should only be used when serializing information for a local store.
79+
*
7580
* @param logger the logger
7681
* @param serializeNulls the setting of whether or not to serialize the null values in the JSON object
7782
*/

src/main/java/com/microsoft/graph/serializer/GsonFactory.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ public static Gson getGsonInstance(@Nonnull final ILogger logger) {
7878
/**
7979
* Creates an instance of GSON
8080
*
81+
* Serializing of null values can have side effects on the service behavior.
82+
* Sending null values in a PATCH request might reset existing values on the service side.
83+
* Sending null values in a POST request might prevent the service from assigning default values to the properties.
84+
* It is not recommended to send null values to the service in general and this setting should only be used when serializing information for a local store.
85+
*
8186
* @param logger the logger
8287
* @param serializeNulls the setting of whether or not to serialize the null values in the JSON object
8388
* @return the new instance

0 commit comments

Comments
 (0)