1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

json2: encode reference fields too (#17058)

This commit is contained in:
Hitalo Souza
2023-04-28 10:24:27 -03:00
committed by GitHub
parent 433208ea7e
commit b0589c645d
6 changed files with 63 additions and 43 deletions

View File

@ -162,7 +162,7 @@ pub fn encode[T](val T) string {
}
default_encoder.encode_value(val, mut sb) or {
dump(err)
println(err)
default_encoder.encode_value[Null](null, mut sb) or {}
}
@ -179,7 +179,7 @@ fn encode_array[T](val []T) string {
}
default_encoder.encode_array(val, 1, mut sb) or {
dump(err)
println(err)
default_encoder.encode_value[Null](null, mut sb) or {}
}