No need for ability to export as JSON

This commit is contained in:
Tobie Morgan Hitchcock 2016-09-28 12:32:41 +01:00
parent bbae9a5fac
commit 701125b879
2 changed files with 0 additions and 6 deletions

View file

@ -50,11 +50,6 @@ func (d *Doc) Copy() (i interface{}) {
return deep.Copy(d.data) return deep.Copy(d.data)
} }
// JSON converts the data object to a JSON byte slice.
func (d *Doc) JSON() (data []byte) {
return pack.ToJSON(d.data)
}
// Encode encodes the data object to a byte slice. // Encode encodes the data object to a byte slice.
func (d *Doc) Encode() (dst []byte) { func (d *Doc) Encode() (dst []byte) {
dst = pack.Encode(&d.data) dst = pack.Encode(&d.data)

View file

@ -31,7 +31,6 @@ func TestConversion(t *testing.T) {
enc := doc.Encode() enc := doc.Encode()
dec := doc.Decode(enc) dec := doc.Decode(enc)
So(doc, ShouldResemble, dec) So(doc, ShouldResemble, dec)
So(doc.JSON(), ShouldResemble, dec.JSON())
}) })
} }