-
Notifications
You must be signed in to change notification settings - Fork 1
/
WithNamelessField_f1_json.go
34 lines (32 loc) · 1.26 KB
/
WithNamelessField_f1_json.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package value_tests
import jsoniter "github.com/json-iterator/tinygo"
type WithNamelessField_f1_json struct {
}
func (json WithNamelessField_f1_json) Type() interface{} {
var val WithNamelessField_f1
return val
}
func (json WithNamelessField_f1_json) Unmarshal(iter *jsoniter.Iterator, out interface{}) {
WithNamelessField_f1_json_unmarshal(iter, out.(*WithNamelessField_f1))
}
func (json WithNamelessField_f1_json) Marshal(stream *jsoniter.Stream, val interface{}) {
WithNamelessField_f1_json_marshal(stream, val.(WithNamelessField_f1))
}
func WithNamelessField_f1_json_unmarshal(iter *jsoniter.Iterator, out *WithNamelessField_f1) {
iter.ReadFloat64((*float64)(out))
}
func WithNamelessField_f1_json_unmarshal_field(iter *jsoniter.Iterator, field string, out *WithNamelessField_f1) bool {
if field == "WithNamelessField_f1" {
WithNamelessField_f1_json_unmarshal(iter, out)
return true
}
return false
}
func WithNamelessField_f1_json_marshal(stream *jsoniter.Stream, val WithNamelessField_f1) {
stream.WriteFloat64((float64)(val))
}
func WithNamelessField_f1_json_marshal_field(stream *jsoniter.Stream, val WithNamelessField_f1) {
stream.WriteObjectField("WithNamelessField_f1")
WithNamelessField_f1_json_marshal(stream, val)
stream.WriteMore()
}