-
Notifications
You must be signed in to change notification settings - Fork 1
/
EmptyStruct_json.go
36 lines (34 loc) · 1.11 KB
/
EmptyStruct_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
35
36
package value_tests
import jsoniter "github.com/json-iterator/tinygo"
type EmptyStruct_json struct {
}
func (json EmptyStruct_json) Type() interface{} {
var val EmptyStruct
return val
}
func (json EmptyStruct_json) Unmarshal(iter *jsoniter.Iterator, out interface{}) {
EmptyStruct_json_unmarshal(iter, out.(*EmptyStruct))
}
func (json EmptyStruct_json) Marshal(stream *jsoniter.Stream, val interface{}) {
EmptyStruct_json_marshal(stream, val.(EmptyStruct))
}
func EmptyStruct_json_unmarshal(iter *jsoniter.Iterator, out *EmptyStruct) {
more := iter.ReadObjectHead()
for more {
field := iter.ReadObjectField()
if !EmptyStruct_json_unmarshal_field(iter, field, out) {
iter.Skip()
}
more = iter.ReadObjectMore()
}
}
func EmptyStruct_json_unmarshal_field(iter *jsoniter.Iterator, field string, out *EmptyStruct) bool {
return false
}
func EmptyStruct_json_marshal(stream *jsoniter.Stream, val EmptyStruct) {
stream.WriteObjectHead()
EmptyStruct_json_marshal_field(stream, val)
stream.WriteObjectTail()
}
func EmptyStruct_json_marshal_field(stream *jsoniter.Stream, val EmptyStruct) {
}