Ranges have two "zero" states
- infinity, or everything
- empty, or nothing
Infinity is marshaled to JSON as:
{
"start": null,
"end": null
}
Empty is marshaled to JSON as:
Unmarshal from these JSON examples should produce the respective ranges. It currently does not for unmarshaling a null. A test case already exists: https://github.com/aodin/date/blob/master/range_test.go#L92-L96