Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax error while parsing JSON numbers with exponent #6932

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed

Syntax error while parsing JSON numbers with exponent #6932

monetdb-team opened this issue Nov 30, 2020 · 0 comments
Labels
bug Something isn't working normal SQL

Comments

@monetdb-team
Copy link

Date: 2020-07-20 16:34:40 +0200
From: jpastuszek
To: SQL devs <>
Version: 11.37.7 (Jun2020)
CC: @kutsurak

Last updated: 2020-07-27 09:30:14 +0200

Comment 27920

Date: 2020-07-20 16:34:40 +0200
From: jpastuszek

User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0
Build Identifier:

If a number starts with integer followed by exponent (e.g. 1e3) it fails to parse as valid JSON number.

Reproducible: Always

Steps to Reproduce:

  1. SELECT json.isValid('[0.1e12]');
  2. SELECT json.isValid('[1e12]');
  3. SELECT json.isValid('{"foo":1e12}');
  4. SELECT json.number(json.filter('{"foo":1e3}', '$.foo'));

Actual Results:

  1. true
  2. false
  3. false
  4. "JSON syntax error: ',' or '}' expected at offset 8"

Expected Results:

  1. true
  2. true
  3. true
  4. 1000.0

This was working in Apr2019 but fails in Jun2020.

Comment 27923

Date: 2020-07-21 08:53:27 +0200
From: @kutsurak

Test added: https://dev.monetdb.org/hg/MonetDB/rev/755905f0a391
Fix added: https://dev.monetdb.org/hg/MonetDB/rev/4ffac7fdf1f0

@monetdb-team monetdb-team added bug Something isn't working normal SQL labels Nov 30, 2020
@sjoerdmullender sjoerdmullender added this to the Ancient Release milestone Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working normal SQL
Projects
None yet
Development

No branches or pull requests

2 participants