Is 081105004 a number for JSON?
Posted: Mon Oct 05, 2015 12:53 pm
I happened to take a json file created by easyJson and run it through a JSON lint program. The program reported an error with a number not being a number. The errant data is a UUID created with a simple formula YYMMDDXXX ( JSON object --- "CRN":081105004 ). The UUID can not be changed as it's a data element from an external source that is out of my control.
Livecode's "is a number" returns true for the above. When I read the JSON spec (json.org) I think I'm seeing that if a number starts with a 0 it must have a "." in it and an integer can not start with a 0? Is that the case?
So is 081105004 a number or a string for JSON? Is "put 081105004 is a number" reporting true the correct answer in Livecode?
Just curious,
Bob
Livecode's "is a number" returns true for the above. When I read the JSON spec (json.org) I think I'm seeing that if a number starts with a 0 it must have a "." in it and an integer can not start with a 0? Is that the case?
So is 081105004 a number or a string for JSON? Is "put 081105004 is a number" reporting true the correct answer in Livecode?
Just curious,
Bob