()
| 70 | } |
| 71 | |
| 72 | func (s SamplePair) MarshalJSON() ([]byte, error) { |
| 73 | t, err := json.Marshal(s.Timestamp) |
| 74 | if err != nil { |
| 75 | return nil, err |
| 76 | } |
| 77 | v, err := json.Marshal(s.Value) |
| 78 | if err != nil { |
| 79 | return nil, err |
| 80 | } |
| 81 | return []byte(fmt.Sprintf("[%s,%s]", t, v)), nil |
| 82 | } |
| 83 | |
| 84 | // UnmarshalJSON implements json.Unmarshaler. |
| 85 | func (s *SamplePair) UnmarshalJSON(b []byte) error { |
nothing calls this directly
no outgoing calls
no test coverage detected