> JSON.parse(a)
SyntaxError: Unexpected token I
at Object.parse (native)
at repl:1:7
at REPLServer.eval (repl.js:80:21)
at Interface.<anonymous> (repl.js:182:12)
at Interface.emit (events.js:67:17)
at Interface._onLine (readline.js:162:10)
at Interface._line (readline.js:426:8)
at Interface._ttyWrite (readline.js:603:14)
at ReadStream.<anonymous> (readline.js:82:12)
at ReadStream.emit (events.js:88:20)
The current problem is that JSON.parse() doesn't recognize Infinity as a value:
(in nodejs, if I assign the JSON returned from the server, it replies with maxTotalInstances of Infinity which then causes a JSON parsing error)
> a = '{"maxImageMeta": 128, "maxPersonality": 5, "maxPersonality Size": 10240, "maxSecurityGro upRules" : 20, "maxSecurityGro ups": 10, "maxServerGroup Members" : 10, "maxServerGroups": 10, "maxServerMeta": 128, "maxTotalCores": 20, "maxTotalFloati ngIps": 10, "maxTotalInstan ces": Infinity, "maxTotalKeypairs": 100, "maxTotalRAMSize": 51200, "totalCoresUsed": 0, "totalFloatingI psUsed" : 0, "totalInstances Used": 0, "totalRAMUsed": 0, "totalSecurityG roupsUsed" : 0, "totalServerGro upsUsed" : 0}'
> JSON.parse(a) <anonymous> (repl.js:182:12) js:162: 10) js:603: 14) <anonymous> (readline.js:82:12)
SyntaxError: Unexpected token I
at Object.parse (native)
at repl:1:7
at REPLServer.eval (repl.js:80:21)
at Interface.
at Interface.emit (events.js:67:17)
at Interface._onLine (readline.
at Interface._line (readline.js:426:8)
at Interface._ttyWrite (readline.
at ReadStream.
at ReadStream.emit (events.js:88:20)