Update incomplete comment.
This commit is contained in:
parent
2fb8c92812
commit
7c42ef3e5d
|
@ -75,6 +75,14 @@ package com.google.gson;
|
||||||
* <p>For certain model classes, you may only want to serialize a field, but exclude it for
|
* <p>For certain model classes, you may only want to serialize a field, but exclude it for
|
||||||
* deserialization. To do that, you can write an {@code ExclusionStrategy} as per normal;
|
* deserialization. To do that, you can write an {@code ExclusionStrategy} as per normal;
|
||||||
* however, you would register it with the
|
* however, you would register it with the
|
||||||
|
* {@link GsonBuilder#addDeserializationExclusionStrategies(ExclusionStrategy...)} method.
|
||||||
|
* For example:
|
||||||
|
* <pre class="code">
|
||||||
|
* ExclusionStrategy excludeStrings = new UserDefinedExclusionStrategy(String.class);
|
||||||
|
* Gson gson = new GsonBuilder()
|
||||||
|
* .addDeserializationExclusionStrategies(excludeStrings)
|
||||||
|
* .create();
|
||||||
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author Inderjeet Singh
|
* @author Inderjeet Singh
|
||||||
* @author Joel Leitch
|
* @author Joel Leitch
|
||||||
|
|
Loading…
Reference in New Issue
Block a user