json: do not generate comptime encode/decode functions already defined in json_primitives.v
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)
|
mut enc := strings.new_builder(100)
|
||||||
sym := g.table.get_type_symbol(typ)
|
sym := g.table.get_type_symbol(typ)
|
||||||
styp := g.typ(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
|
return
|
||||||
}
|
}
|
||||||
if sym.kind == .array {
|
if sym.kind == .array {
|
||||||
|
|
Loading…
Reference in New Issue