Changes

Jump to navigation Jump to search
→‎JSON files: update for SMAPI 2.8 data API
Line 13: Line 13:  
<source lang="c#">
 
<source lang="c#">
 
// read file
 
// read file
var model = this.Helper.ReadJsonFile<ModData>("data.json") ?? new ModData();
+
var model = this.Helper.Data.ReadJsonFile<ModData>("data.json") ?? new ModData();
    
// save file (if needed)
 
// save file (if needed)
this.Helper.WriteJsonFile("data.json", model);
+
this.Helper.Data.WriteJsonFile("data.json", model);
 
</source>
 
</source>
  
translators
8,403

edits

Navigation menu