mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
Add all types of int and float to json decode/encode
This commit is contained in:

committed by
Alex Medvednikov

parent
877f9e7070
commit
e285311290
@ -109,7 +109,9 @@ string res = tos2("");
|
||||
}
|
||||
|
||||
fn is_js_prim(typ string) bool {
|
||||
return typ == 'int' || typ == 'string' || typ == 'bool'
|
||||
return typ == 'int' || typ == 'string' ||
|
||||
typ == 'bool' || typ == 'float' || typ == 'f32' || typ == 'f64' ||
|
||||
typ == 'i8' || typ == 'i16' || typ == 'i32' || typ == 'i64'
|
||||
}
|
||||
|
||||
fn (p mut Parser) decode_array(typ string) string {
|
||||
|
Reference in New Issue
Block a user