fix issue with parser and lower case true/false
This commit is contained in:
parent
1b06d9ca94
commit
bcef697282
2 changed files with 4 additions and 4 deletions
|
|
@ -18,9 +18,9 @@ ws "whitespace" = [ \t\n\r]*
|
||||||
value = false / null / true / object / array / number / stringval / class / empty
|
value = false / null / true / object / array / number / stringval / class / empty
|
||||||
|
|
||||||
empty = "" { return undefined; }
|
empty = "" { return undefined; }
|
||||||
null = "None" { return null; }
|
null = "None" / "none" { return null; }
|
||||||
false = "False" { return false; }
|
false = "False" / "false" { return false; }
|
||||||
true = "True" { return true; }
|
true = "True" / "true" { return true; }
|
||||||
|
|
||||||
// ----- Objects -----
|
// ----- Objects -----
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ function deparseArray(input) {
|
||||||
function deparseNumber(input, key) {
|
function deparseNumber(input, key) {
|
||||||
// Any number which has a decimal is stored to 6 decimal places
|
// Any number which has a decimal is stored to 6 decimal places
|
||||||
// Except for IDs. Unless they actually have such a number... erm...
|
// Except for IDs. Unless they actually have such a number... erm...
|
||||||
if (key.substr(key.length - 2, 2) === "ID") {
|
if (key && key.substr(key.length - 2, 2) === "ID") {
|
||||||
if (input % 1 === 0) {
|
if (input % 1 === 0) {
|
||||||
return Number(input).toString();
|
return Number(input).toString();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue