Start to add support for json marshalling
This commit is contained in:
parent
ababac6b57
commit
be7b4d5873
|
@ -0,0 +1,9 @@
|
|||
package dns
|
||||
|
||||
// UnmarshalJSON(data []byte) (err error)
|
||||
func (rr *A) MarshalJSON() ([]byte, error) {
|
||||
// b, _ := json.Marshal(rr.Header())
|
||||
b := []byte(`"` + rr.A.String() + `"`)
|
||||
return b, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue