From b0053d891018499fcf5cbe98f2738e3135ef31cf Mon Sep 17 00:00:00 2001 From: div72 <60045611+div72@users.noreply.github.com> Date: Mon, 9 Nov 2020 09:37:53 +0300 Subject: [PATCH] x.json2: change default number type to i64 (#6773) --- vlib/x/json2/decoder.v | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vlib/x/json2/decoder.v b/vlib/x/json2/decoder.v index 8fd911c4dc..eb1f1097f7 100644 --- a/vlib/x/json2/decoder.v +++ b/vlib/x/json2/decoder.v @@ -62,7 +62,7 @@ fn (p Parser) emit_error(msg string) string { } column := util.imax(0, cur.pos - pp + cur.len - 1) line := cur.line_nr - return '[jisoni] $msg ($line:$column)' + return '[json] $msg ($line:$column)' } fn new_parser(srce string, convert_type bool) Parser { @@ -291,7 +291,7 @@ fn (mut p Parser) decode_number() ?Any { } if tl.starts_with('.') { - return error('lecimals must start with a digit followed by a dot.') + return error('decimals must start with a digit followed by a dot.') } if tl.ends_with('+') || tl.ends_with('-') { @@ -318,7 +318,7 @@ fn (mut p Parser) decode_number() ?Any { return if is_fl { Any(tl.f64()) } else { - Any(tl.int()) + Any(tl.i64()) } }