Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

null 会被写入成 'null',会无法反序列化,需要添加或 判断string(j) == "null" #66

Open
kexirong opened this issue Aug 26, 2021 · 0 comments
Assignees

Comments

@kexirong
Copy link

func (j RawJson) Value() (driver.Value, error) {
	if len(j) == 0 || string(j) == "null" {
		return nil, nil
	}
	bytes, err := j.MarshalJSON()
	return string(bytes), err
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants