Handle marshaling of numbers and strings for channels

This commit is contained in:
Paul Tyng
2021-03-21 21:13:58 -04:00
parent 9c60a9de6f
commit 82a3baaf00
5 changed files with 171 additions and 10 deletions

View File

@@ -119,7 +119,9 @@ type ChannelPlanRadioTable struct {
func (dst *ChannelPlanRadioTable) UnmarshalJSON(b []byte) error {
type Alias ChannelPlanRadioTable
aux := &struct {
Width emptyStringInt `json:"width"`
BackupChannel numberOrString `json:"backup_channel"`
Channel numberOrString `json:"channel"`
Width emptyStringInt `json:"width"`
*Alias
}{