@return Singleton instance of the Gson parser that handle Asana's date format (ISO 3339)
()
| 33 | * @return Singleton instance of the Gson parser that handle Asana's date format (ISO 3339) |
| 34 | */ |
| 35 | static public Gson getInstance() { |
| 36 | if (instance == null) { |
| 37 | instance = new GsonBuilder() |
| 38 | .registerTypeAdapter(DateTime.class, new ISO3339DateDeserializer()) |
| 39 | .setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'") |
| 40 | .create(); |
| 41 | } |
| 42 | return instance; |
| 43 | } |
| 44 | } |
no test coverage detected