From 52cf86d6093f2d5a84c01c9ab8859332f7d834a5 Mon Sep 17 00:00:00 2001 From: Zac Sweers Date: Wed, 15 Jan 2020 13:29:24 -0500 Subject: [PATCH] Tweak README nullSafe() example (#1073) Resolves #1003 --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f6d694b..7844fa0 100644 --- a/README.md +++ b/README.md @@ -230,9 +230,8 @@ For example, if you have an adapter that doesn't support nullable values, you ca String dateJson = "\"2018-11-26T11:04:19.342668Z\""; String nullDateJson = "null"; -// RFC 3339 date adapter, doesn't support null by default -// See also: https://github.com/square/moshi/tree/master/adapters -JsonAdapter adapter = new Rfc3339DateJsonAdapter(); +// Hypothetical IsoDateDapter, doesn't support null by default +JsonAdapter adapter = new IsoDateDapter(); Date date = adapter.fromJson(dateJson); System.out.println(date); // Mon Nov 26 12:04:19 CET 2018