mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
json: do not generate comptime encode/decode functions already defined in json_primitives.v
This commit is contained in:
parent
c6a7d0a3a0
commit
6161392648
@ -22,7 +22,7 @@ fn (mut g Gen) gen_json_for_type(typ table.Type) {
|
||||
mut enc := strings.new_builder(100)
|
||||
sym := g.table.get_type_symbol(typ)
|
||||
styp := g.typ(typ)
|
||||
if sym.name in ['int', 'string', 'bool', 'f32'] {
|
||||
if sym.name in ['int', 'string', 'bool', 'f32', 'f64', 'i8', 'i16', 'i64', 'byte', 'u16', 'u32', 'u64', 'bool'] {
|
||||
return
|
||||
}
|
||||
if sym.kind == .array {
|
||||
|
Loading…
Reference in New Issue
Block a user