Compare commits

..

1 Commits

Author SHA1 Message Date
runcong zhang 1badc6c983
Merge 40080c2aaf into 5e2ae3f23c 2024-05-09 20:37:29 +03:00
3 changed files with 1 additions and 11 deletions

View File

@ -12,7 +12,7 @@ jobs:
- name: checkout
uses: actions/checkout@v3
- name: build
run: docker compose run go-json
run: docker-compose run go-json
test:
name: Test

View File

@ -426,11 +426,6 @@ func Test_Marshal(t *testing.T) {
assertErr(t, err)
assertEq(t, "[]interface{}", `[1,2.1,"hello"]`, string(bytes))
})
t.Run("[]*time.Time", func(t *testing.T) {
bytes, err := json.Marshal([]*time.Time{nil})
assertErr(t, err)
assertEq(t, "[]*time.Time", `[null]`, string(bytes))
})
})
t.Run("array", func(t *testing.T) {

View File

@ -406,11 +406,6 @@ func AppendMarshalJSON(ctx *RuntimeContext, code *Opcode, b []byte, v interface{
rv = newV
}
}
if rv.Kind() == reflect.Ptr && rv.IsNil() {
return AppendNull(ctx, b), nil
}
v = rv.Interface()
var bb []byte
if (code.Flags & MarshalerContextFlags) != 0 {