SHARE
TWEET

test

a guest May 22nd, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.    // public AdventureData LoadAdventureDataFromJsonFile(string filePath, string adventureName)
  2.     //{
  3.     //    string jsonString = LoadResourceTextfile(adventureName);
  4.     //    JsonSerializer serializer = new JsonSerializer();
  5.     //    adventureData = (AdventureData)JsonConvert.DeserializeObject<AdventureData>(jsonString);
  6.  
  7.     //    return adventureData;
  8.     //}
  9.  
  10. public Object LoadDataFromJsonFile(string fileName, string subPath, Object typeOfDataObject)
  11.     {
  12.         Object sd;
  13.         string jsonString = LoadResourceTextfile(fileName, subPath);
  14.         JsonSerializer serializer = new JsonSerializer();
  15.         sd = JsonConvert.DeserializeObject<typeOfDataObject>(jsonString);
  16.         return sd;
  17.     }
  18.  
  19. AdventuresData test = LoadDataFromJsonFile("name", "subpath", AdventureData AD);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top