Modding Help Not a valid JSON file

Discussion in 'Mods' started by yunafarm, Feb 8, 2023.

  1. yunafarm

    yunafarm Void-Bound Voyager

    Hello! I was trying to install the Multi-Yield mod (https://www.nexusmods.com/stardewvalley/mods/6069?tab=description&BH=0) and I can't get it to run, in SMAPI it says it is not a valid JSON file, specifically:

    [Multi Yield Crops] Can't parse JSON file at D:\Steam\steamapps\common\Stardew Valley\Mods\MultiYieldCrops\config.json. This doesn't seem to be valid JSON.
    Technical details: Unexpected character encountered while parsing value: }. Path 'Harvests[0].HarvestRules[0].disableWithMods', line 13, position 9. at StardewModdingAPI.Toolkit.Serialization.JsonHelper.ReadJsonFileIfExists[TModel](String fullPath, TModel& result) in E:\source\_Stardew\SMAPI\src\SMAPI.Toolkit\Serialization\JsonHelper.cs:line 86
    at StardewModdingAPI.Framework.ModHelpers.DataHelper.ReadJsonFile[TModel](String path) in E:\source\_Stardew\SMAPI\src\SMAPI\Framework\ModHelpers\DataHelper.cs:line 50
    at StardewModdingAPI.Framework.ModHelpers.ModHelper.ReadConfig[TConfig]() in E:\source\_Stardew\SMAPI\src\SMAPI\Framework\ModHelpers\ModHelper.cs:line 152
    at MultiYieldCrop.MultiYieldCrops.InitializeHarvestRules() in C:\Users\chron\source\repos\stardew-valley-mods\MultiYieldCrops\src\MultiYieldCrops.cs:line 190

    For the sake of this post, I'll just paste part of the code I edited (the rest being the same but with different 'cropname' and 'itemname'). Can anyone help me with why this is wrong? I've loaded it on JSON validator already and played around with the code in accordance with what it says the errors are but can't get it to work :/

    {
    "Harvests": [
    {
    "CropName": "Parsnip",
    "HarvestRules": [
    {
    "ExtraYieldItemType": "Object",
    "ItemName": "Parsnip",
    "minHarvest": 1,
    "maxHarvest": 3,
    "maxHarvestIncreasePerFarmingLevel": 0.5,
    "disableWithMods": []
    }
    ]
    },

    {
    "CropName": "Blue Jazz",
    "HarvestRules": [
    {
    "ExtraYieldItemType": "Object",
    "ItemName": "Blue Jazz",
    "minHarvest": 1,
    "maxHarvest": 3,
    "maxHarvestIncreasePerFarmingLevel": 0.5,
    "disableWithMods": []
    }
    ]
    },

    {
    "CropName": "Cauliflower",
    "HarvestRules": [
    {
    "ExtraYieldItemType": "Object",
    "ItemName": "Cauliflower",
    "minHarvest": 1,
    "maxHarvest": 3,
    "maxHarvestIncreasePerFarmingLevel": 0.5,
    "disableWithMods": []
    }
    ]
    }
    ]
    }

    Much thanks in advance :D
     
    • Pangaea

      Pangaea Forum Moderator

    Share This Page