A slim time.Time wrapper that handles pointer to time and formats the encoded time as RFC3339/ISO8601, which is easy to format and read from.
Either use jsontime.JSONTime as a pointer or the object itself, then just use it with the default json package.
type testJSON struct {
Test JSONTime `json:"test"`
}
type testPtrJSON struct {
Test *JSONTime `json:"test"`
}For a more detailed usage example please have a look at the tests.
MIT License
Copyright (c) 2019 Alexander Pinnecke