Json files can be opened and edited with a simple text editor. This, for example, is the main info file for the D-Series (info.json): Code: { "Name":"D-Series", "Brand":"Gavril", "Author":"BeamNG", "Country":"United States", "Type":"Truck", "Body Style":"Pickup", "Years":{"min":1988, "max":1994}, "Derby Class":"Medium Truck", "default_pc":"v8_4wd", "default_color":"Sea Blue", "colors":{ "Pearl White": "1 1 1 1.2", "Charcoal": "0.18 0.18 0.18 1.2", "Silver": "0.65 0.65 0.65 1.2", "Gray": "0.5 0.5 0.5 1.3", "Carbon Gray": "0.33 0.33 0.33 1.3", "Cream": "1 0.9 0.8 1.4", "Light Brown": "0.6 0.45 0.35 1.3", "Clay Red": "0.45 0.28 0.233 1.3", "Jet Black": "0 0 0 1.3", "Fire Red": "1 0 0 1.2", "Champagne": "0.55 0.5 0.45 1.2", "Scarlet Red": "0.68 0.1 0.11 1.3", "Flame Orange": "1 0.3 0 1.2", "Chestnut": "0.3 0.2 0.12 1.2", "Burgundy": "0.5 0 0 1.2", "Forest Green": "0.1 0.4 0.2 1.2", "Seafoam Green": "0.24 0.48 0.48 1.2", "Verdant Green": "0.21 0.55 0.11 1.3", "Olive Green": "0.27 0.35 0.23 1.2", "Army Green": "0.32 0.35 0.23 1.5", "Opal Green": "0.22 0.37 0.33 1.3", "Aquamarine": "0.15 0.35 0.6 1.2", "Sea Blue": "0.2 0.3 0.6 1.2", "Brilliant Blue": "0.05 0.35 0.8 1.2", "Royal Blue": "0.0 0.1 0.42 1.3", "Solar Yellow": "0.95 0.7 0.1 1.3", "Vibrant Red": "0.9 0.05 0.04 1.3", "Sunset Purple": "0.20 0.22 0.65 1.3", "Pleasant Blue": "0.35 0.50 0.65 1.2", "Bermuda Blue": "0.06 0.145 0.17 1.2", "Navy Blue": "0.0 0.05 0.25 1.2" } }
I know but i want to write a JSon trough the lua code --- Post updated --- I found Code: serializeJsonToFile("mods/unpacked/sirenmod/lua/vehicle/extensions/auto/latestConfig.json", "latestConfig") but when i do that the json file is clear and there is only: "latestConfig" write on the first line
Yes but it return me the latestConfig value, so in my json i have: "settings_default" --- Post updated --- I searched in the game main files and it seem i have to add them in a table... but it give me that: [myValue1, myValue2] :/ --- Post updated --- For the answer: Code: local i = { variableUn = "1", variableDeux = "2" } serializeJsonToFile("/sirenmod/config/latestConfig.json", i, true)