MarshalJSON set ip to json
()
| 161 | |
| 162 | // MarshalJSON set ip to json |
| 163 | func (ip IP) MarshalJSON() ([]byte, error) { |
| 164 | return []byte("\"" + net.IP(ip).String() + "\""), nil |
| 165 | } |
| 166 | |
| 167 | // MarshalJSONBuf set ip to json with buf |
| 168 | func (ip IP) MarshalJSONBuf(buf fflib.EncodingBuffer) error { |