Java Code Examples for org.threeten.bp.Instant#parse()
The following examples show how to use
org.threeten.bp.Instant#parse() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: InstantConverterTest.java From ThreeTen-Backport-Gson-Adapter with Apache License 2.0 | 5 votes |
@Test public void testSerialization() { Instant instant = Instant.parse("2010-08-20T00:01:00Z"); String json = gson.toJson(instant); assertEquals(json, "\"2010-08-20T00:01:00Z\""); }
Example 2
Source File: InstantAdapter.java From u2020-mvp with Apache License 2.0 | 4 votes |
@FromJson public Instant fromJson(String value) { return Instant.parse(value); }
Example 3
Source File: InstantAdapter.java From u2020 with Apache License 2.0 | 4 votes |
@FromJson public Instant fromJson(String value) { return Instant.parse(value); }