Help with integers

I’m retrieving some json and parsing it. The items consist of an id, name and image. Not sure why but the id is not being parsed into an int. I’m getting data returned as follows when I print each item from the returned parsejson(raw):

name: Video
shortDescription: My video
thumbnailURL: http://...................../myimage.jpg
videos: <Component: roArray>
id:  3.171e+12

How do I handle the id and retrieve the correct integer? I’m attempting to print to the console but I’m not finding the solution. Probably something simple I’m missing.

In the past, when I’ve needed to convert a string representing a large integer into a Double I’ve used the following trick:

BrightScript Debugger> xstr="4294967296000"
BrightScript Debugger> eval("x="+xstr)
BrightScript Debugger> ?x
 4294967296000
BrightScript Debugger> ?type(x)
Double

-JT

“TheEndless” wrote:
From what I’ve been told, though, using Eval() causes an inherent memory leak, so it should be avoided whenever possible
I’ve wondered about that. I recall a test where I did an eval() in a loop and eventually the channel would crash. I guess the question is whether these leaks are cleaned up when the channel exits normally (or abnormally for that matter).

-JT