I was using FindDocumentByKeyValue(), but the problem is every variable values in the downloaded json became surrounded by quotes. When i checked in App42 storage dashboard, the json is fine, only strings has quotes.
Here is the code that is use:
storageService.FindDocumentByKeyValue(dbName, collectionName, key, value, new UnityCallBack());
public class UnityCallBack : App42CallBack
{
public void OnSuccess(object response)
{
Storage storage = (Storage) response;
IList<Storage.JSONDocument> jsonDocList = storage.GetJsonDocList();
for(int i=0;i <jsonDocList.Count;i++)
{
App42Log.Console("objectId is " + jsonDocList[i].GetDocId());
App42Log.Console("jsonDoc is " + jsonDocList[i].GetJsonDoc());
GlobalController.Instance.saveData = JsonUtility.FromJson<PlayerDB>(jsonDocList[0].GetJsonDoc());
}
}
public void OnException(Exception e)
{
App42Log.Console("Exception : " + e);
}
}
This problem leads to failure in convertion with unity JsonUtility. It recognize every true boolean in quotes as false.
Does anyone ever experienced this?