Thomas Leonard
2011-09-29 08:22:57 UTC
JSON allows "1e+1" as well as "1e1":
http://www.json.org/
However, E's JSON parser rejects it:
? def surgeon := <elib:serial.deJSONKit>.makeSurgeon()
? surgeon.unserialize("1e+1")
# value: 10.0
new syntax error: Missing exponent
# 1e+1
# ^^
This patch fixes it:
http://gitorious.org/~tal-itinnov/repo-roscidus/it-innovation/commit/a2bf52beff24defc63bd8fe5cf1f8cfe85547c23
Note: a side-effect is that it also allows this syntax in regular E
code. I assume that's not a problem?
--
Dr Thomas Leonard
IT Innovation Centre
Gamma House, Enterprise Road,
Southampton SO16 7NS, UK
tel: +44 23 8059 8866
mailto:***@it-innovation.soton.ac.uk
http://www.it-innovation.soton.ac.uk/
http://www.json.org/
However, E's JSON parser rejects it:
? def surgeon := <elib:serial.deJSONKit>.makeSurgeon()
? surgeon.unserialize("1e+1")
# value: 10.0
new syntax error: Missing exponent
# 1e+1
# ^^
This patch fixes it:
http://gitorious.org/~tal-itinnov/repo-roscidus/it-innovation/commit/a2bf52beff24defc63bd8fe5cf1f8cfe85547c23
Note: a side-effect is that it also allows this syntax in regular E
code. I assume that's not a problem?
--
Dr Thomas Leonard
IT Innovation Centre
Gamma House, Enterprise Road,
Southampton SO16 7NS, UK
tel: +44 23 8059 8866
mailto:***@it-innovation.soton.ac.uk
http://www.it-innovation.soton.ac.uk/