Skip to content

Commit

Permalink
doc(UserGuide): mention TypeAdapters class (#1685)
Browse files Browse the repository at this point in the history
  • Loading branch information
simon04 committed May 2, 2020
1 parent 55acc23 commit 1a9469a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions UserGuide.md
Expand Up @@ -301,11 +301,12 @@ This approach is practical only if the array appears as a top-level element or i

### <a name="TOC-Built-in-Serializers-and-Deserializers"></a>Built-in Serializers and Deserializers

Gson has built-in serializers and deserializers for commonly used classes whose default representation may be inappropriate.
Here is a list of such classes:
Gson has built-in serializers and deserializers for commonly used classes whose default representation may be inappropriate, for instance

1. `java.net.URL` to match it with strings like `"https://github.com/google/gson/"`
2. `java.net.URI` to match it with strings like `"/google/gson/"`
* `java.net.URL` to match it with strings like `"https://github.com/google/gson/"`
* `java.net.URI` to match it with strings like `"/google/gson/"`

For many more, see the internal class [`TypeAdapters`](https://github.com/google/gson/blob/master/gson/src/main/java/com/google/gson/internal/bind/TypeAdapters.java).

You can also find source code for some commonly used classes such as JodaTime at [this page](https://sites.google.com/site/gson/gson-type-adapters-for-common-classes-1).

Expand Down

0 comments on commit 1a9469a

Please sign in to comment.