xgoprev/xmodules/cjson/main.go

26 lines
357 B
Go
Raw Normal View History

2024-06-06 09:07:56 +03:00
package cjson
2024-06-06 00:13:12 +03:00
import "github.com/d5/tengo/v2"
import "io"
import "encoding/json"
//import "github.com/d5/tengo/v2/stdlib"
const (
StrStdin = "<stdin>"
)
var Module = map[string]tengo.Object{
"new_decoder": &tengo.BuiltinFunction{
Name: "new_decoder",
Value: NewDecoder,
},
}
type Encoder struct {
enc *json.Encoder
output io.Writer
}
//func