App42 BaaS - Storage Service - numeric string converted to float problem

0 votes

I'm experiencing some weird behavior wherein I get record data using the storage service like the following:

 

{"uname":"xxx","tlogin":1414983399,"tlast":1414983404,"fbid":"12345678912345678","tsav":1414983286}

 

but when I get the data using the storage service, the fbid field comes out as a float instead of just a string (fbid is returned as "1.23456789123456E+16") this behavior where a numerical string is returned as a float happens when the string length is greater than 15 characters (for example, "123456789123456" (only 15 char length) is properly converted as-is to its string value). I use the following methods:

 

To get the data, I call:

storageService.FindDocumentByKeyValue("pInfo", "uname", "xxx", myCallback);
 
 
In myCallback(string result, object data), I call:
string jsonDoc = ((Storage)data).GetJsonDocList()[0].jsonDoc;
 
the 'data' variable has the complete string value of fbid, it's only after GetJsonDocList() that the fbid seems to be converted to a float and then to a string. I'm using the App42_Unity3D_SDK_3.0 and I'm using Unity v4.5.4f1 on the iPhone, iPod, iPad Platform.  Please help me on this problem, thank you.
asked Nov 3, 2014 in App42 Cloud API-BaaS by jonathan.cortes (56 points)

1 Answer

0 votes
 
Best answer

Hello Jonathan,

It looks like a bug in Unity SDK. We will release a patch by EOD today. Thanks for your support.

Himanshu Sharma

answered Nov 4, 2014 by hs00105 (2,005 points)
selected Nov 18, 2014 by jonathan.cortes
Hello Himanshu,

I am having the same problem today, with App42 3.0.1 in Unity too.

Is this problem supossed to be solved already?

Thank you!
Appoligeis for the delay in response. We have fixed this issue and patch is available to download. Kindly find the latest version of App42 SDK from the below link & let us know if it helps.

https://github.com/shephertz/App42_Unity3D_SDK
 
Thanks,
Himanshu Sharma
It works perfectly.

Thanks for the support.
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...