Commits

Anonymous committed dcf0e00

abstract away from json

Comments (0)

Files changed (1)

 import "C"
 
 import (
-	"json"
+	"os"
 )
 
 // I/O ----------------------------------------------------------------------
 	Vhep   [][4]float64
 }
 
-func WriteTo(enc *json.Encoder) {
+type Encoder interface {
+	Encode(v interface{}) os.Error
+}
+
+func WriteTo(enc Encoder) {
 	evt := event{Nevhep: EventNumber(),	Nhep: NumberEntries()}
 	evt.Isthep = make([]int, evt.Nhep)
 	evt.Idhep  = make([]int, evt.Nhep)