im tring to make a mod for personal use for content patcher but it keeps saying that its haveing issues with my content file? heres what it said [Content Patcher] Error preloading content pack 'SansMod'. Technical details: Newtonsoft.Json.JsonReaderException: Can't parse JSON file at C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\Mods\[CP]Sans\content.json. This doesn't seem to be valid JSON. Technical details: After parsing a value an unexpected character was encountered: {. Path 'Changes[0]', line 11, position 1. at StardewModdingAPI.Toolkit.Serialization.JsonHelper.ReadJsonFileIfExists[TModel](String fullPath, TModel& result) in C:\source\_Stardew\SMAPI\src\SMAPI.Toolkit\Serialization\JsonHelper.cs:line 74 at StardewModdingAPI.Framework.ContentPack.ReadJsonFile[TModel](String path) in C:\source\_Stardew\SMAPI\src\SMAPI\Framework\ContentPack.cs:line 74 at ContentPatcher.ModEntry.<GetContentPacks>d__24.MoveNext() in C:\source\_Stardew\Mods.Pathoschild\ContentPatcher\ModEntry.cs:line 292 and hers the lines i wrote { "Format": "1.0", "Changes": [ //shane portrait { "Action": "Load", "Target": "Portraits/Shane", "FromFile": "Assets/Portrait.png", } //shane sprite { "Action": "Load", "Target": "Characters/Shane", "FromFile": "Assets/Sprites.png", } //Shane Jojamart { "Action": "Load", "Target": "Characters/Shane_JojaMart", "FromFile": "Assets/Jojamart.png", } //Clothes Therapy { "Action": "Load", "Target": "Characters/ClothesTherapyCharacters" "FromFile": "Assets/ClothesTherapy.png", } //Names { "Action": "Load", "Target": "Data/NPCDispositions", "FromFile": "Assets/NPCDispositions.xnb" } ] } what did i do wrong???
Each patch object must be separated with commas; there is also another missing comma at the end of the Target line for the Clothes Therapy section. Note that you can use https://smapi.io/json to check the syntax. Here's a fixed version of what you posted using that site (also updated the format to current CP version): https://smapi.io/json/content-patcher/2c8be10233e44d569d69fbce4f5ccfda Note that the validator puts the commas after the comments
You can check your json coding via https://json.smapi.io If you are still having trouble tracking down the issue, hop onto the SDV discord's #modding channel with a link to the json upload and we can take a look!