why every variable value in my downloaded json surrounded by quotes?

+1 vote

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?

asked Dec 5, 2017 in Unity by harispraba (15 points)

1 Answer

0 votes

Apologies for the delayed response.

Could you please add us(collaborator@shephertz.com) as a collaborator into your app in AppHQ and share the AppName with us. It will help us to provide better support to you from our end.

To add collaborator please follow the below steps:

AppHQ->App42 Cloud API->AppManager->Collaborator->Add Collaborator->Enter the given emailID and submit



Priyanka Singh

App42 Team
answered Dec 6, 2017 by anonymous
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