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