You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Pietro Cerutti (JIRA)" <ji...@apache.org> on 2016/10/05 12:13:20 UTC
[jira] [Updated] (AVRO-1930) JsonParser doesn't handle integer
scientific notation
[ https://issues.apache.org/jira/browse/AVRO-1930?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pietro Cerutti updated AVRO-1930:
---------------------------------
Labels: patch (was: )
Status: Patch Available (was: Open)
diff --git a/impl/json/JsonIO.cc b/impl/json/JsonIO.cc
index 2e7d82f..eafd579 100644
--- a/impl/json/JsonIO.cc
+++ b/impl/json/JsonIO.cc
@@ -171,6 +171,10 @@ JsonParser::Token JsonParser::tryNumber(char ch)
state = 3;
sv.push_back(ch);
continue;
+ } else if (ch == 'e' || ch == 'E') {
+ sv.push_back(ch);
+ state = 5;
+ continue;
}
hasNext = true;
}
@@ -185,6 +189,10 @@ JsonParser::Token JsonParser::tryNumber(char ch)
state = 3;
sv.push_back(ch);
continue;
+ } else if (ch == 'e' || ch == 'E') {
+ sv.push_back(ch);
+ state = 5;
+ continue;
}
hasNext = true;
}
> JsonParser doesn't handle integer scientific notation
> -----------------------------------------------------
>
> Key: AVRO-1930
> URL: https://issues.apache.org/jira/browse/AVRO-1930
> Project: Avro
> Issue Type: Bug
> Components: c++
> Affects Versions: 1.8.1
> Reporter: Pietro Cerutti
> Labels: patch
>
> The JsonParser doesn't handle, e.g., 1e12, which is valid according to the JSON specification.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)