VE Lua Documentation

Press F to search!

jsonReadFile

Definition


-- @/lua/common/utils.lua:478

function jsonReadFile(filename)
  local content = readFile(filename)
  if content == nil then
    -- parent needs to deal with error reporting
    return nil
  end
  return jsonDecode(content, filename)
end

Callers

@/lua/ge/extensions/freeroam/specialTriggers.lua
  if filePath then
    setupTriggers(jsonReadFile(filePath))
  end
@/lua/ge/extensions/core/quickAccess.lua

local iconTags = jsonReadFile("ui/assets/iconMappings/iconTags.json")
local iconTagsWarned = {}
local function loadRecentActions()
  local savedRecentActions = jsonReadFile(recentActionsFile)
  if savedRecentActions then
  else
    savedDynamicSlotSettings = jsonReadFile(dynamicSlotSettingsFile)
  end
@/lua/ge/extensions/core/weather.lua
local function loadPreset(filename)
  local filePresets = jsonReadFile(filename)
  --log('D', 'weather', "Weather preset loaded: " .. tostring(filename) .. ": "..dumps(filePresets))
@/lua/ge/extensions/editor/flowgraphEditor.lua
  else
    local data = jsonReadFile(fCbData.filepath)
    if data then
      for _, fileName in ipairs(allFiles) do
        local file = jsonReadFile(fileName)
        if file then
@/lua/ge/extensions/editor/assetDeduplicator.lua
      if FS:fileExists(cacheFile) then
        cacheData = jsonReadFile(cacheFile) or {}
      end
@/lua/ge/extensions/editor/dynamicDecals/fonts.lua
  if fontAtlasDataMap[fontName] then return end
  fontAtlasDataMap[fontName] = jsonReadFile(string.format("%s%s/%s%s", destinationDirectory, fontName, fontName, fontAtlasJsonExtension))
end
    local success = false
    local jsonContent = jsonReadFile(file)
    if jsonContent["header"] then
@/lua/ge/extensions/core/repository.lua
local function modSubscribe(mod_id, useOptOut)
  local optOutData = jsonReadFile(optoutFile) or {}
  if useOptOut and optOutData[mod_id] then
  -- record in that file that we opted out intentionally
  local optOutData = jsonReadFile(optoutFile) or {}
  optOutData[mod_id] = true
@/lua/ge/extensions/gameplay/missions/proceduralMissionGenerators/timeTrialMissions.lua
    else
      cachedRaceFiles[cacheFile] = jsonReadFile(cacheFile)
    end
@/lua/ge/extensions/career/modules/linearTutorial.lua

  local saveInfo = savePath and jsonReadFile(savePath .. "/info.json")
  local outdated = not saveInfo or saveInfo.version < moduleVersion

  saveData = (not outdated and savePath and jsonReadFile(savePath .. saveFile)) or {}
@/lua/ge/extensions/career/modules/branches/leagues.lua
    for _, file in ipairs(files) do
      local data = jsonReadFile(file)
      if data then
@/gameplay/missionTypes/rallyRoadSection/constructor.lua
--     local path = require('/lua/ge/extensions/gameplay/race/path')("New Path")
--     path:onDeserialized(jsonReadFile(self.missionFolder.."/race.race.json"))
--     path:autoConfig()
@/lua/ge/extensions/editor/api/material.lua
local function removeMaterialFromJson(materialName, materialFilename)
  local matFileContent = jsonReadFile(materialFilename)
  matFileContent[materialName] = nil
@/lua/ge/extensions/editor/multiSpawnManager.lua
  for _, f in ipairs(commonFiles) do
    local temp = jsonReadFile(f)
    if temp and temp.name then
local function loadGroup(filePath) -- loads and prepares a group from a file
  local tempGroup = jsonReadFile(filePath)
@/lua/ge/extensions/ui/ambientSound.lua
  end
  local soundFile = jsonReadFile(json)
  local soundTable={}
@/lua/ge/extensions/flowgraph/nodes/vehicle/ai/scriptAI/playRecording.lua
  if not self.pinIn.fileName.value then return end
  local json = jsonReadFile(self.mgr:getRelativeAbsolutePath({self.pinIn.fileName.value, self.pinIn.fileName.value..trackFileExt}))
  if not json then
  if not json then
    json = jsonReadFile(trackFilePath..self.pinIn.fileName.value)
  end
  if not json then
    json = jsonReadFile(trackFilePath..self.pinIn.fileName.value..trackFileExt)
  end
@/lua/ge/extensions/flowgraph/nodes/vehicle/customPartsConfigProvider.lua
      if im.Button("Load Config") then
        self.partConfig = jsonReadFile(self.configPath) or {parts = {},vars = {}}
        if not tableIsEmpty(self.partConfig.parts) then
        if im.Button("Read from File") then
          self.partConfig = jsonReadFile(veh.partConfig) or {parts = {},vars = {}}
          if not tableIsEmpty(self.partConfig.parts) then
@/lua/ge/extensions/editor/forestEditor.lua
  if FS:fileExists(pM_textureSetsFilePath) then
    pM_textureSets = jsonReadFile(pM_textureSetsFilePath)
  else
@/lua/ge/extensions/editor/api/dynamicDecals.lua
  end
  local data = jsonReadFile(path_string)
  M.onDeserialized(data)
@/lua/ge/extensions/util/renderComponentsAPI.lua
    for _, filename in ipairs(rendererComponentFiles) do
      local data = jsonReadFile(filename)
      if data then
@/lua/ge/extensions/gameplay/missions/progress.lua
    local state, result = xpcall(function()
      return jsonReadFile(permaLogFile)
    end, debug.traceback)
    local state, result = xpcall(function()
      local saveData = jsonReadFile(path)
      local updated = false
@/lua/ge/extensions/editor/gen/test.lua
		local fname = '/levels/smallgrid/bat/bin1.json'
		local data = jsonReadFile(fname)
			lo('?? from_paul:'..#data)
		local filepath = '/levels/italy/art/prefabs/'
		local data = jsonReadFile(filepath)
	end
--            for _,f in pairs(afile) do
				local desc = jsonReadFile(f)
--                    lo('?? for_mat_json:'..tostring(desc))
@/lua/ge/extensions/util/inputSystemUtils.lua
    if path:find('inputmaps/') then
      local m = jsonReadFile(path)
      if m then

local vendorNames = jsonReadFile("lua/ge/extensions/util/vendorNames.json")
@/lua/ge/extensions/editor/roadSpline.lua
            function(data)
              local profile = jsonReadFile(data.filepath)
              groupMgr.pasteGroupProfile(selGroup, profile)
@/lua/ge/extensions/editor/mapSensorEditor.lua
      end
      local loadedJson = jsonReadFile(data.filepath)
      sensors = loadedJson.data and lpack.decode(loadedJson.data) or techUtils.tableToVec3Recursive(loadedJson)
@/lua/ge/ge_utils.lua
  if string.endswith(objFileName, ".prefab.json") then
    local jsonData = jsonReadFile(objFileName)
      else
        config = jsonReadFile(opt.config)
        if not config then
          local potentialPath = "vehicles/"..modelName.."/"..opt.config
          config = jsonReadFile(potentialPath)
          if config then
@/lua/ge/extensions/util/calibrateESC.lua
    local filepath = "vehicles/" .. vehName .. "/info_" .. config .. ".touched"
    local data = jsonReadFile(filepath)
    if not data then
  -- Load the blacklisted vehicles
  local blackListFile = jsonReadFile("blacklist.json")
    log("I", logTag, "Couldn't find blacklist.json.")
    local defaultBlackListFile = jsonReadFile("blacklistDefault.json")
@/lua/ge/extensions/career/modules/spawnPoints.lua

  local saveInfo = savePath and jsonReadFile(savePath .. "/info.json")
  local outdated = not saveInfo or saveInfo.version < moduleVersion

  unlockedSpawnpoints = (not outdated and savePath and jsonReadFile(savePath .. "/career/"..fileName)) or {}
end
@/lua/ge/extensions/gameplay/missions/missions.lua
    if FS:fileExists(reqPath) then
      missionProgressSetupData[missionTypeName] = jsonReadFile(reqPath)
      if not missionProgressSetupData[missionTypeName] then
    if FS:fileExists(reqPath) then
      missionStaticData[missionTypeName] = jsonReadFile(reqPath)
      if not missionStaticData[missionTypeName] then
  end
  local missionData = jsonReadFile(infoPath)
  if not missionData then
@/lua/ge/extensions/freeroam/facilities.lua
  local fileDir, fn, _ = path.split(file, true)
  local data = jsonReadFile(file)
  for type, listKey in pairs(facilityTypeToListName) do
@/lua/ge/extensions/flowgraph/manager.lua
    --print("Loading Macro from File.")
    serializedData = jsonReadFile(path)
    local macro = self:createGraph('for from file loading', true)
    local dirname, fn, e = path.split(filename)
    local data = jsonReadFile(filename)
    local macroName = string.match(fn, "(%a*)")
@/lua/ge/extensions/core/vehicles.lua
      for _, fn in ipairs(jbeamFiles) do
        local fileData = jsonReadFile(fn)
        if fileData then
    if not string.endswith(filename, '.pc') then filename = filename .. '.pc' end
    local data = jsonReadFile(filename)
    -- If the pc file format is 2, keep the config as the filename
  if config.linkedPCFile then
    local data = jsonReadFile(config.linkedPCFile)
    if data and data.format == 4 then
  if designPath then
    design = jsonReadFile(designPath)
  end
  if designPath and designPath~="" and FS:fileExists(designPath) then
    design = jsonReadFile(designPath)
  end
      if FS:fileExists(designPath) then
        design = jsonReadFile(designPath)
      end
    designPath = DEFAULT_DESIGN_PATH
    design = jsonReadFile(designPath)
  end
        if FS:fileExists(defaultDesignFallBackPath) then
          local defaultDesign = jsonReadFile(defaultDesignFallBackPath)
          if defaultDesign then
        if FS:fileExists(designData.data.characterLayout) then
          designData.data.characterLayout = jsonReadFile(designData.data.characterLayout)
        else
        designData.data.characterLayout= "vehicles/common/licenseplates/default/platefont.json"
        designData.data.characterLayout= jsonReadFile(designData.data.characterLayout)
      end

  local data = jsonReadFile(pathDefaultConfig)
  if not data then

  local data = jsonReadFile(pathDefaultConfig)
  if not data then
  if FS:fileExists(pathDefaultConfig) then
    local data = jsonReadFile(pathDefaultConfig)
    if vehicle then
@/lua/ge/extensions/editor/missionPlaybook.lua
  end
  local json = jsonReadFile(filename)
  if not json then
@/lua/ge/extensions/editor/api/gui.lua

  local atlasInfo = jsonReadFile(atlasJsonPath)
  editor.icons = atlasInfo.icons
  local finalFilename = customFilename or windowsStateFileName
  local wstate = jsonReadFile(finalFilename) or {}
  local wstateFileExists = FS:fileExists(finalFilename)
    editor.logWarn("Editor windows state file '" .. tostring(finalFilename) .. "' format version mismatch. Expected: " .. WindowsStateFileFormatVersion .. " File: " .. tostring(wstate.version) .. ", will upgrade.")
    wstate = jsonReadFile(defaultWindowsStateFileName)
    --TODO: upgrade code for older versions of the file
@/lua/ge/extensions/career/modules/playerAttributes.lua
  if not saveSlot then return end
  local jsonData = (savePath and jsonReadFile(savePath .. "/career/playerAttributes.json")) or {}

  local saveInfo = savePath and jsonReadFile(savePath .. "/info.json")
  if saveInfo and saveInfo.version < 37 then

  attributeLog = (savePath and jsonReadFile(savePath .. "/career/attributeLog.json")) or attributeLog
@/lua/ge/extensions/core/hardwareinfo.lua
  if FS:fileExists("integrity.json") then
    local manifest = jsonReadFile("integrity.json")
    if manifest and manifest.format == 1 and manifest.integritydata then
  end
  local data = jsonReadFile(outFilename)
  guihooks.trigger('BananaBenchReady', data)
local function readBananabenchFile()
  return jsonReadFile('bananabench.json')
end
@/lua/ge/extensions/career/modules/unlockFlags.lua

--  local data = savePath and jsonReadFile(savePath .. "/career/" .. saveFile) or {}
--  flags = data or {}
@/lua/ge/extensions/editor/crawlEditor/presets.lua
function C:loadPresets()
  local filePresets = jsonReadFile(self.PRESETS_FILE)
  if filePresets then
function C:importPreset(filepath, category)
  local data = jsonReadFile(filepath)
  if not data then
@/gameplay/missionTypes/rallyStage/constructor.lua
    local path = require('/lua/ge/extensions/gameplay/race/path')("New Path")
    path:onDeserialized(jsonReadFile(self.missionFolder.."/race.race.json"))
    path:autoConfig()
@/lua/ge/extensions/util/docCreator.lua
local function getTestedControllers()
  local vendorNames = jsonReadFile("lua/ge/extensions/util/vendorNames.json")
  local mergedInfo = {} -- use a map to merge information that is spread across multiple json files
  for _,inputmapPath in ipairs(inputmapPaths) do
    local out = jsonReadFile(inputmapPath)
@/gameplay/missionTypes/rallyLoop/constructor.lua
    local path = require('/lua/ge/extensions/gameplay/race/path')("New Path")
    local raceData = jsonReadFile(raceFilePath)
    if not raceData then
@/lua/ge/extensions/editor/gen/world.lua
		clean()
		desc = jsonReadFile(fname)
		lo('?? fromJSON2:'..fname..':'..tostring(desc))
				file:close()
				cnt = jsonReadFile(ok..'managedItemData.json')
			end
	if false then
		local desc = jsonReadFile('/lua/ge/extensions/editor/gen/save.json')
		desc = U.fromJSON(desc)
			io.close(file)
			local conf = jsonReadFile(setfile)
				U.dump(conf,'?? check:'..tostring(setfile))
		-- restore from history
		desc = jsonReadFile(fsave..'_'..asave[csave]..'.json')
		desc = U.fromJSON(desc)
				local fname = fdata.filepath
				local data = jsonReadFile(fname)
					lo('?? from_paul:'..#data)
@/lua/ge/extensions/scenario/busdriver.lua
    -- reading in config file so we can add seat ballast
    local vehicleConfig = jsonReadFile(configPath)
    vehicleConfig.parts.citybus_seats_ballast = "citybus_seats_ballast"
@/lua/ge/extensions/editor/terrainAndRoadImporter.lua
  local gW = Point2I(0, 0)
  local jsonFull = jsonReadFile(filepath)
  local peaks = {}
  -- Read the roads file.
  local jsonFull = jsonReadFile(roadPath)
@/gameplay/missionTypes/aiRace/constructor.lua
    local path = require('/lua/ge/extensions/gameplay/race/path')('New Path')
    path:onDeserialized(jsonReadFile(self.fgVariables.raceFile))
    path:autoConfig()
@/lua/ge/extensions/ui/vehicleSelector/general.lua
  if FS:fileExists(pathDefaultConfig) then
    local data = jsonReadFile(pathDefaultConfig)
    if data then
@/lua/ge/extensions/core/paths.lua

  local pathJsonObj = jsonReadFile(pathFileName)
  if not pathJsonObj then
@/lua/ge/extensions/flowgraph/modules/fileModule.lua
    if FS:fileExists(p) then
      self.files[file] = jsonReadFile(p) or deepcopy(defaultFile)
    else
@/lua/ge/extensions/core/vehicle/mirror.lua
local function settingsLoad()
  local s = jsonReadFile("/settings/mirrorOffsets.json")
  if s then
@/lua/ge/extensions/ui/audio.lua
local function onFirstUpdate()
  local soundsJson = jsonReadFile("ui/soundClasses.json")
  M.ui_sound_classes = soundsJson or {}
@/lua/ge/extensions/editor/tech/roadArchitect/profiles.lua
    function(data)
      local loadedJson = jsonReadFile(data.filepath)
      local serProfile = loadedJson.profile
local function loadPrefabProfile(filepath)
  local loadedJson = jsonReadFile(filepath)
  local serProfile = loadedJson.profile
@/lua/ge/extensions/editor/slotTrafficEditor.lua

  local loadedNavgraph = jsonReadFile(levelDir .. "navgraph.json")
  if loadedNavgraph then
    -- Load roads if available
    local loadedRoads = jsonReadFile(levelDir .. "roads.json")
    if loadedRoads then
@/lua/ge/extensions/editor/assetBrowser.lua
        else
          file.inspectorData.data = jsonReadFile(file.sourcefilename or file.path)
        end
    elseif file.type == "part configuration" or file.type == "jbeam" then
      file.inspectorData.data = jsonReadFile(file.sourcefilename or file.path)
      file.inspectorData.rawdata = dumps(file.inspectorData.data)
    elseif file.type == "materials" then
      file.inspectorData.data = jsonReadFile(file.sourcefilename or file.path)
      file.inspectorData.rawdata = dumps(file.inspectorData.data)
@/lua/ge/extensions/util/logStreams.lua
local function readJson()
  return jsonReadFile(logfileJson)
end
@/lua/ge/extensions/gameplay/drift/saveLoad.lua
        id = spotId,
        spatialInfo = jsonReadFile(file).spatialInfo,
        racePath = dir.."race.race.json",
      -- infos for ui etc
      local info = jsonReadFile(dir .. "info.json") or {}
      info.preview = M.getPreviewWithFallback(dir)
      -- save data
      local saveData = jsonReadFile(saveFolder .. spotId .. ".json") or {}
      if next(saveData) then loaded = loaded + 1 end
  end
  local json = jsonReadFile(fileName)
  if not json then
@/lua/ge/extensions/editor/rallyEditor/measurementsTab.lua

  local data = jsonReadFile(filePath)
  if not data then
@/lua/ge/extensions/freeroam/freeroamConfigurator.lua
  if not defaultTileData then
    defaultTileData = jsonReadFile("lua/ge/extensions/freeroam/configuratorOptions/defaultTiles.json")
  end
local function loadConfigurationFromFile()
  local data = jsonReadFile(CONFIG_FILE)
  if data and data.version ~= version then
@/lua/ge/extensions/gameplay/statistic.lua
  -- log("E","load","load!!!!!!")
  local l = jsonReadFile(fileName)
  if l and l.entries and type(l.entries)=="table" and l.version then
    if not saveSlot then return end
    fileDataCareer = jsonReadFile(savePath.. "/career/gameplay_stat.json")
    -- if no stats are found, create empty data.
@/lua/ge/extensions/editor/scriptAIManager.lua
local function loadRecording(bo, vehId, filename)
  local data = jsonReadFile(filename)
  recordings[vehId] = data.recording
    if FS:fileExists(persistenceFilename) and im.SmallButton("load") then
      M.onDeserialized(jsonReadFile(persistenceFilename))
    end
@/lua/ge/extensions/editor/rallyEditor/missionSettings.lua
  local full_filename = folder..'/'..rallyUtil.notebooksPath..'/'..basename
  local json = jsonReadFile(full_filename)
  if not json then
@/lua/ge/extensions/core/vehicle/partmgmt.lua
local function getDefaultConfigFileFromDir(vehicleDir, configData)
  local vehicleInfo = jsonReadFile(vehicleDir .. '/info.json')
  if not vehicleInfo then return end
  elseif configData ~= nil and configData ~= "" then
    fileData = jsonReadFile(configData)
    if fileData then
    if configData then
      fileData = jsonReadFile(configData)
    end
@/lua/ge/extensions/util/trackBuilder/splineTrack.lua
    if FS:fileExists(filename) then
      read = jsonReadFile(filename)
      if not read then
  if FS:fileExists(filename) then
    local read = jsonReadFile(filename)
    if not read then
@/lua/ge/extensions/gameplay/missions/missionManager.lua
      if trafficSetup.customGroupFile then
        local json = jsonReadFile(trafficSetup.customGroupFile)
        if json and json.data then
@/lua/ge/extensions/editor/flowgraph/examples.lua

        lectionData.data = jsonReadFile(filename)
        lectionData.path = path .. moduleName
@/lua/ge/extensions/editor/scriptAIEditor.lua
    function(data)
      local loadedJson = jsonReadFile(data.filepath)
      local data = lpack.decode(loadedJson.data)
    function(data)
      local importedData = jsonReadFile(data.filepath)
      local tIdx = "imported_" .. tostring(getNextUniqueId())
@/lua/ge/extensions/scenario/scenariosLoader.lua
    if FS:fileExists(tmp) then
      local infoJson = jsonReadFile(tmp)
      if infoJson and infoJson.title then
  if scenarioPath then
    local scenarioData = jsonReadFile(scenarioPath)
    if scenarioData then
    for _, fgPath in ipairs(fgFiles) do
      local fgData = jsonReadFile(fgPath)
      newLevel.levelName = levelName
      newLevel.levelInfo = jsonReadFile('/levels/'..levelName..'/info.json') -- this contains the level info for the UI!
      newLevel.official = isOfficialContentVPath('/levels/'..levelName..'/info.json')
      for _, file in pairs(busLineFiles) do
        local busLine = jsonReadFile(file)
        for _, route in pairs(busLine.routes) do
@/lua/ge/extensions/gameplay/missions/proceduralMissionGenerators/busModeMissions.lua
    for _, file in pairs(busLineFiles) do
      local busLine = jsonReadFile(file)
      for _, route in pairs(busLine.routes) do
@/lua/common/settings.lua

M.defaults = jsonReadFile(M.pathDefaults) or {}
M.deprecated = jsonReadFile(M.pathDeprecated) or {}
M.defaults = jsonReadFile(M.pathDefaults) or {}
M.deprecated = jsonReadFile(M.pathDeprecated) or {}
   if FS:fileExists(M.pathInternal) then
    local internalValues = jsonReadFile(M.pathInternal) or {}
    M.internalValues = upgradeSettings(internalValues)
if runningOnSteamDeck then -- set by C++
  local steamdeckValues = jsonReadFile(M.pathSteamdeck) or {}
  steamdeckValues = upgradeSettings(steamdeckValues)
    local values = deepcopy(M.defaultValues)
    local cloudValues = jsonReadFile(M.pathCloud) or {}
    local localValues = jsonReadFile(M.pathLocal) or {}
    local cloudValues = jsonReadFile(M.pathCloud) or {}
    local localValues = jsonReadFile(M.pathLocal) or {}
@/lua/ge/extensions/editor/rallyEditor.lua

  -- local json = jsonReadFile(full_filename)
  -- if not json then
@/lua/ge/extensions/career/modules/delivery/generator.lua
    for _,file in ipairs(files) do
      for k, v in pairs(jsonReadFile(file) or {}) do
        local item = v
    for _,file in ipairs(files) do
      for id, filter in pairs(jsonReadFile(file) or {}) do
        filter.id = id
    for _,file in ipairs(files) do
      for id, data in pairs(jsonReadFile(file) or {}) do
        data.id = id
@/lua/ge/extensions/flowgraph/nodes/gameplay/race/filePath.lua
    local path = require('/lua/ge/extensions/gameplay/race/path')("New Path")
    path:onDeserialized(jsonReadFile(file))
    if self.pinIn.reverse.value then
@/gameplay/missionTypes/flowgraph/editor.lua
  self.currentConfig = fgPath
  local data = jsonReadFile(fgPath)
  fgConfigurators[fgPath] = data.configurabilityData or {
@/lua/vehicle/extensions/dynamicVehicleData.lua
  local filepath = "vehicles/" .. model_key .. "/info_" .. config_key .. ".json"
  local data = jsonReadFile(filepath)
  data = clearData(data, whiteList)
@/lua/ge/extensions/util/groundModelDebug.lua
local function deserializeSettings()
  local tbl = jsonReadFile(settingsPath)
  if tbl then
@/gameplay/missionTypes/timeTrial/constructor.lua
    local path = require('/lua/ge/extensions/gameplay/race/path')("New Path")
    path:onDeserialized(jsonReadFile(self.missionFolder.."/race.race.json"))
    path:autoConfig()
@/lua/ge/extensions/campaign/campaignsLoader.lua
  --TODO(AK): add code to validate that this campaign is valid
  local campaign = jsonReadFile(campaignfile)
  campaign.sourceFile =  string.gsub(campaignfile, "(.*:)(.*)", "%2")
  for k,filename in pairs(files) do
    local fileData = jsonReadFile(filename) or {}
    if fileData.header and fileData.header.type == 'campaign' then
  for k,filename in pairs(files) do
    local fileData = jsonReadFile(filename) or {}
    if fileData.header and fileData.header.type == 'campaignSave' then
  -- TODO(AK): Look into the use of global _G. Once system is up and running, confirm if there is a better approach
  local savedData = jsonReadFile(saveFilename)
  for name,data in pairs(savedData) do
@/lua/ge/extensions/editor/roadArchitect.lua
      -- Collect the loaded data.
      local loadedJson = jsonReadFile(data.filepath).data
      local serRoads, serProfiles, serJunctions = loadedJson.roads, loadedJson.profiles, loadedJson.junctions
  -- Collect the data which requires de-serialised.
  local loadedJson = jsonReadFile(tempFilepath).data
  local serRoads, serProfiles, serGroups, serPlacedGroups, serJunctions = loadedJson.roads, loadedJson.profiles, loadedJson.groups, loadedJson.placedGroups, loadedJson.junctions
@/lua/ge/extensions/ui/gridSelectorUtils/displayDataModule.lua
  local function loadAllData()
    local data = jsonReadFile(dataFile) or {}
    data.displayData = data.displayData or {}
@/lua/ge/extensions/career/modules/partInventory.lua

  local saveInfo = savePath and jsonReadFile(savePath .. "/info.json")
  local outdated = not saveInfo or saveInfo.version < minimumVersion

  local jsonData = savePath and jsonReadFile(savePath .. "/career/partInventory.json")
  if jsonData and not outdated then
@/gameplay/missionTypes/generatedTimeTrial/constructor.lua
    local path = require('/lua/ge/extensions/gameplay/race/path')("New Path")
    path:onDeserialized(jsonReadFile(self.fgVariables.fileRace))
    path:autoConfig()
@/lua/ge/extensions/gameplay/crashTest/scenarioManager.lua

  scriptAiFile = jsonReadFile(scriptAiFilePath)
@/lua/ge/extensions/trackbuilder/trackBuilder.lua
local function deserializeSettings()
  local settings = jsonReadFile("settings/trackBuilderSettings.json")
  if not settings then return end
@/lua/ge/extensions/util/terrainGenerator.lua
    if matData.filePath then
      local json = jsonReadFile(matData.filePath)
      if not json then
@/lua/ge/extensions/editor/vehicleDetailViewer.lua
      jsonWriteFile(layoutFilename, onSerialize())
      onDeserialized(jsonReadFile(layoutFilename))
      loadedLayoutBaseFilename = baseFilename
          loadedLayoutBaseFilename = baseFilename
          onDeserialized(jsonReadFile(layoutFilename))
          view.statusMessage = 'Layout loaded: ' .. layoutFilename
          jsonWriteFile(layoutFilename, onSerialize())
          onDeserialized(jsonReadFile(layoutFilename))
          view.statusMessage = 'Layout saved: ' .. layoutFilename
    views = {}
    onDeserialized(jsonReadFile(layoutFilenameDefault))
    if #views == 0 then
@/lua/ge/extensions/editor/flowgraph/references.lua
  for _, filename in ipairs(flowgraphDirectory) do
    local data = jsonReadFile(filename)
@/lua/ge/extensions/career/modules/loanerVehicles.lua
  local saveSlot, savePath = career_saveSystem.getCurrentSaveSlot()
  local saveData = (savePath and jsonReadFile(savePath .. "/info.json")) or {}
  local secondsSinceSaveFileCreation = dateUtils.timeSince(saveData.creationDate)
@/lua/ge/extensions/career/modules/delivery/general.lua

  local saveInfo = savePath and jsonReadFile(savePath .. "/info.json")
  local outdated = not saveInfo or saveInfo.version < moduleVersion

  local data = (not outdated and savePath and jsonReadFile(savePath .. "/career/"..saveFile)) or {}
@/lua/ge/extensions/tech/partAnnotations.lua

  local cfg = jsonReadFile(cfgFile)
  for part, color in pairs(cfg) do

  local anno = jsonReadFile(annoFile)
  if anno ~= nil and anno.CAR ~= nil then
@/lua/ge/extensions/editor/main.lua
local function loadExtensionsSettings()
  M.extensionsSettings = jsonReadFile(editorExtensionsSettingsPath) or {}
end
  editor.logDebug("Loading editor state...")
  local state = jsonReadFile(filePath or editorCurrentStatePath) or {}
@/lua/ge/extensions/gameplay/missions/missionScreen.lua
  for _, file in ipairs(FS:findFiles("/gameplay/testing", "*.json", 1, false, true)) do
    local layout = jsonReadFile(file)
    layout.filePath = file
@/lua/ge/extensions/gameplay/traffic/trafficUtils.lua
  local fileName = path.getPathLevelInfo(getCurrentLevelIdentifier() or '')
  local info = jsonReadFile(fileName)
  local country = 'default'
    fileName = files[math.random(#files)] -- if multiple files exist, select one randomly
    group = jsonReadFile(fileName)
    if group then
@/lua/ge/extensions/editor/driftDataEditor.lua
  end
  local json = jsonReadFile(filename)
  if not json then
    local infoPath = "levels/"..getCurrentLevelIdentifier().."/driftSpots/"..tempSpot.id:match("([^/]+)$").."/info.json"
    tempSpot.info = jsonReadFile(infoPath) or {
      name = tempSpot.id:match("([^/]+)$"),
@/lua/ge/extensions/core/input/bindings.lua
        local settingsFile = "/settings/scePadGuids.json"
        local guids = jsonReadFile(settingsFile)
        for _, info in ipairs(guids) do
        if sourcePath then
          local data = jsonReadFile(sourcePath)
          if data then
@/lua/ge/extensions/editor/vehicleEditor/staticEditor/veStaticRenderView.lua
local function init()
  local viewsSerialized = jsonReadFile(settingsPath)
@/lua/ge/extensions/ui/bindingsLegend.lua
local function onExtensionLoaded()
  local bindingAppActions = jsonReadFile(actionJsonFilePath)
  if bindingAppActions then
@/lua/ge/client/postFx.lua
    -- log('I', 'postFx', "loadPresetFile loading: "..presetFilename)
    local preset = jsonReadFile(presetFilename)
    preset.header = nil -- remove header first before parsing to create TS flags
@/lua/ge/extensions/util/richPresence.lua
  local data =  {current={key=jbeamName}}
  data.model = jsonReadFile("/vehicles/".. jbeamName .."/info.json")
  return data
@/lua/ge/extensions/core/environment.lua
local function loadGroundModelFile(filename)
  local gms = jsonReadFile(filename)
  if not gms then
@/lua/ge/extensions/ui/apps.lua
    if appDir then
      local appData = jsonReadFile(fn)
      appData.official = isOfficialContentVPath(fn)
    local replace = false
    local origLayout = jsonReadFile(originalFilePath)
    if FS:fileExists(userFilePath) then
    if FS:fileExists(userFilePath) then
      local userLayout = jsonReadFile(userFilePath)
      local userLayoutChanged = false
  for _, fn in ipairs(jsonFiles) do
    local layout = jsonReadFile(fn)
    if FS:fileExists(originalFilePath) then
      local originalLayout = jsonReadFile(originalFilePath)
      for _, app in ipairs(originalLayout.apps) do
@/lua/ge/extensions/gameplay/rally/notebook/missionSettings.lua
  -- read the mission settings file
  local newMissionSettingsData = jsonReadFile(self:fname())
  if not newMissionSettingsData then
  -- re-read the mission settings file
  local newMissionSettingsData = jsonReadFile(self:fname())
  if not newMissionSettingsData then
  -- re-read the mission settings file
  local newMissionSettingsData = jsonReadFile(self:fname())
  if not newMissionSettingsData then
  -- re-read the mission settings file
  local newMissionSettingsData = jsonReadFile(self:fname())
  if not newMissionSettingsData then
@/lua/ge/extensions/editor/raceEditor.lua
  end
  local json = jsonReadFile(filename)
  if not json then
@/lua/ge/extensions/gameplay/sites/sitesManager.lua
  else
    local data = jsonReadFile(filepath)
    if data then
@/lua/ge/extensions/editor/perfProfiler.lua
      if FS:fileExists(annotationFileName) then
        annotation = jsonReadFile(annotationFileName)
      end
  if filepath == nil or filepath == "" then return end
  local fileData = jsonReadFile(filepath)
  fileData.meta = fileData.meta or {}
        if FS:fileExists(file) then
          fileData.meta.annotation = jsonReadFile(file)
          log("I","Loaded annotation file for recording. It might be out of date. ".. file)
@/lua/common/libs/xlsxlib/tests/tests.lua
  end
  local expectedData = jsonReadFile(fn)[1]
  local equal = tablesEqual(data, expectedData)
@/lua/vehicle/beamstate.lua

  local save = jsonReadFile(filename)
@/lua/ge/extensions/core/ropeVisualTest.lua
local function loadParametersFromFile(filePath)
  local data = jsonReadFile(filePath)
  if not data or not data.uiState then
@/lua/ge/extensions/core/busRouteManager.lua
  for _,jFilename in pairs(jFiles) do
    local data = jsonReadFile(jFilename)
    if data == nil then log('E', logTag, "Error while loading file "..jFilename)
@/lua/ge/extensions/flowgraph/nodes/vehicle/ai/scriptAI/pathFromFile.lua
  if self.loadedFile == nil then
    self.loadedFile = jsonReadFile(self.mgr:getRelativeAbsolutePath(self.fileName))
  end
@/lua/ge/extensions/core/replay.lua
    local metaFileName = dir .. fn .. ".rplMeta.json"
    local meta = jsonReadFile(metaFileName)
    if meta and meta.missionId == mission.id and ((returnOnlyWithAttempt and meta.attempt) or not returnOnlyWithAttempt) and ((isCurrentlyInCareer and meta.context.saveSlot == currentSaveSlot) or not isCurrentlyInCareer) then

  local meta = jsonReadFile(finalPath..fn..".rplMeta.json")
  local recordingFiles = getMissionReplayFiles(gameplay_missions_missions.getMissionById(meta.missionId))

  local meta = jsonReadFile(missionReplaysPath..fn..".rplMeta.json")
  local recordingFiles = getMissionReplayFiles(gameplay_missions_missions.getMissionById(meta.missionId))
@/lua/ge/extensions/career/modules/vehicleShopping.lua

  local saveInfo = savePath and jsonReadFile(savePath .. "/info.json")
  local outdated = not saveInfo or saveInfo.version < moduleVersion

  local data = not outdated and jsonReadFile(savePath .. "/career/vehicleShop.json")
  if data then
@/lua/ge/extensions/career/branches.lua
    for _, filePath in ipairs(FS:findFiles(branchesDir, 'info.json', -1, false, true)) do
      local fileInfo = jsonReadFile(filePath)
      if not fileInfo.ignore then

  local saveInfo = savePath and jsonReadFile(savePath .. "/info.json")
  local outdated = not saveInfo or saveInfo.version < moduleVersion

  local data = (savePath and not outdated and jsonReadFile(savePath .. "/career/"..saveFile)) or {}
  for id, branch in pairs(getBranches()) do
@/lua/ge/extensions/ui/console.lua
local function settingsLoad()
  local s = jsonReadFile(settingsPath)
  if s then
  if not history then
    history = jsonReadFile(historyPath) or {}
  end
    -- log("E","onFileChanged","reload history")
    history = jsonReadFile(historyPath) or {}
  end
@/lua/ge/extensions/util/worker.lua
  --TorqueScript.eval("$disableTerrainMaterialCollisionWarning=1;$disableCachedColladaNotification=1;")
  workItems = jsonReadFile(jobfile)
  if not workItems then
@/lua/ge/extensions/editor/drivePathEditor.lua
          if data.filepath then
            local serData = jsonReadFile(data.filepath)
            if serData.mapName ~= core_levels.getLevelName(getMissionFilename()) then
@/lua/common/jbeam/interaction.lua
    --log('I', 'events', 'loaded interaction file: ' .. tostring(filename))
    local j = jsonReadFile(filename)
    if j.fileversion ~= supportedFileVersion then
@/lua/ge/extensions/editor/decalSpline.lua
              local preState = splineMgr.deepCopyDecalSpline(selSpline)
              splineMgr.pasteDecalSplineProfile(selSpline, jsonReadFile(data.filepath))
              editor.history:commitAction("Load Decal Spline Template", { old = preState, new = splineMgr.deepCopyDecalSpline(selSpline) }, splineMgr.singleSplineEditUndo, splineMgr.singleSplineEditRedo, true)
@/lua/ge/extensions/util/dependencyTree.lua
local function processForestFile(forestDataFilename, sourceFile, entity)
  local rootNode = jsonReadFile(forestDataFilename)
  if not rootNode or not rootNode.instances then return end
  for _, filename in pairs(filenames) do
    processSimObject(jsonReadFile(filename), filename)
  end
  for _, shapeInfoFn  in pairs(shapeInfoFiles) do
    local rootNode = jsonReadFile(shapeInfoFn)
    if rootNode and rootNode.materials and #rootNode.materials > 0 then
@/lua/ge/extensions/editor/flowgraph/welcome.lua
      description = 'Compete in a short race versus an AI-controlled vehicle.',
      data = jsonReadFile('/lua/ge/extensions/flowgraph/examples/scenarios/simpleRace/race.flow.json')
    }
@/lua/vehicle/controller/drivingDynamics/sensors/vehicleData.lua
    local configFilePath = string.format("%sdrivingDynamics/%s.stat.json", vehiclePath, configName)
    local configContent = jsonReadFile(configFilePath)
    if configContent then
@/lua/ge/extensions/gameplay/rally/notebook/path.lua
  local infoPath = missionDir .. "/info.json"
  local info = jsonReadFile(infoPath)
  if info and info.missionType then

  local json = jsonReadFile(self.fname)
  if not json then
local function readMetadataFile(fname)
  local json = jsonReadFile(fname)
  if not json then
@/lua/ge/extensions/editor/meshSpline.lua
              local preState = splineMgr.deepCopyMeshSpline(selSpline)
              splineMgr.pasteMeshSplineProfile(selSpline, jsonReadFile(data.filepath))
              editor.history:commitAction("Load Mesh Spline Template", { old = preState, new = splineMgr.deepCopyMeshSpline(selSpline) }, splineMgr.singleSplineEditUndo, splineMgr.singleSplineEditRedo, true)
@/lua/ge/extensions/editor/roadTemplateEditor.lua
  deselectTemplate()
  local jsonData = jsonReadFile("levels/".. editor.getLevelName() .. "/roadtemplates/" .. name .. ".road.json")
@/lua/ge/extensions/tech/techCore.lua

    info['options'] = jsonReadFile('/vehicles/' .. info['model'] .. '.json')
    vehicleInfo[id] = info
  local tb = extensions['util_trackBuilder_splineTrack']
  tb.load(jsonReadFile(trackPath), true, nil, nil, true, false)

  local loadedJson = jsonReadFile(filepath)
  if not loadedJson then
  local filepath = request.filepath
  local loadedJson = jsonReadFile(filepath)
  if not loadedJson then
@/lua/ge/extensions/editor/terrainEditor.lua
local function selectPreset(data)
  local preset = jsonReadFile(data.filepath)
  if preset and preset.type and preset.type=="TerrainData" then
@/lua/ge/extensions/gameplay/parking.lua
  local fileName = path.getPathLevelInfo(getCurrentLevelIdentifier() or '')
  local info = jsonReadFile(fileName)
  local region
@/lua/ge/extensions/gameplay/drag/saveSystem.lua

  local stripData = jsonReadFile(stripId)
  if not stripData then

  local data = jsonReadFile(filepath)
  if not data then
  local filePath = "settings/dragDialTimes.json"
  local dialTimes = jsonReadFile(filePath) or {}
  local filePath = "settings/dragDialTimes.json"
  local dialTimes = jsonReadFile(filePath) or {}
  local result = {}
  local filePath = "settings/dragDialTimes.json"
  local dialTimes = jsonReadFile(filePath) or {}
  local savePath = dir .. "/dragDialTimes.json"
  local filePath = "settings/dragDialTimes.json"
  local dialTimes = jsonReadFile(filePath) or {}
      for _, file in ipairs(facilityFiles) do
        local f = jsonReadFile(file)
        if f and f.id == id then
        -- Try the path as-is first
        local stripData = jsonReadFile(stripFilePath)
        -- If not found, try alternative paths (dragRaces vs dragstrips)
          if altPath ~= stripFilePath then
            stripData = jsonReadFile(altPath)
          end
          if altPath ~= stripFilePath then
            stripData = jsonReadFile(altPath)
          end
    for _, file in ipairs(facilityFiles) do
      local facility = jsonReadFile(file)
      if facility then
    for _, file in ipairs(stripFiles) do
      local strip = jsonReadFile(file)
      if strip then
@/lua/ge/map.lua
  local fileName = path.getPathLevelInfo(getCurrentLevelIdentifier() or '')
  local info = jsonReadFile(fileName)
  if info and info.roadRules then
@/lua/ge/extensions/editor/dragRaceEditor/dragSettings.lua
M.loadDragSettings = function(filePath)
  local json = jsonReadFile(filePath)
  if json then
@/lua/ge/extensions/editor/biomeTool.lua
  if FS:fileExists(levelDataPath) then
    var.layers = jsonReadFile(levelDataPath)
    --initEmptyFieldInfo()
@/lua/ge/extensions/career/career.lua
  log("I", "Loading career from " .. savePath .. "/career/" .. saveFile)
  local careerData = (savePath and jsonReadFile(savePath .. "/career/" .. saveFile)) or {}
  local newSave = tableIsEmpty(careerData)
  local autosavePath = career_saveSystem.getAutosave(career_saveSystem.getSaveRootDirectory() .. saveSlot)
  local infoData = jsonReadFile(autosavePath .. "/info.json")
    -- save slot from file
    local attData = jsonReadFile(autosavePath .. "/career/playerAttributes.json")
    local inventoryData = jsonReadFile(autosavePath .. "/career/inventory.json")
    local attData = jsonReadFile(autosavePath .. "/career/playerAttributes.json")
    local inventoryData = jsonReadFile(autosavePath .. "/career/inventory.json")
    local insuranceData = jsonReadFile(autosavePath .. "/career/insurance.json")
    local inventoryData = jsonReadFile(autosavePath .. "/career/inventory.json")
    local insuranceData = jsonReadFile(autosavePath .. "/career/insurance.json")
    if inventoryData and inventoryData.currentVehicle then
      local vehicleData = jsonReadFile(autosavePath .. "/career/vehicles/" .. inventoryData.currentVehicle .. ".json")
      if vehicleData then
  for _, saveData in ipairs(career_saveSystem.getAllAutosaves(saveSlot)) do
    local data = jsonReadFile(career_saveSystem.getSaveRootDirectory() .. saveSlot .. "/" .. saveData.name .. "/career/playerAttributes.json")
    if data then
@/lua/ge/extensions/editor/tech/roadArchitect/groups.lua
    function(data)
      local loadedJson = jsonReadFile(data.filepath).data
      local gSer = deserialiseGroup(loadedJson.group)
    local g = prefabGroupFilepaths[i]
    local loadedJson = jsonReadFile(g.path).data
    local gSer = deserialiseGroup(loadedJson.group)
@/lua/ge/extensions/editor/assetManagementTool.lua

      local json = jsonReadFile(filename)
local function loadDuplicatesList()
  assetsByHash = jsonReadFile("/temp/assetMigrationList.json")
@/lua/ge/extensions/scenario/quickRace.lua
    local file = sc.track.raceFile
    local json = jsonReadFile(file)
    if not json then
@/lua/ge/extensions/career/modules/playbookWriter.lua

  local saveInfo = savePath and jsonReadFile(savePath .. "/info.json")
  local outdated = not saveInfo or saveInfo.version < moduleVersion

  playbook = (not outdated and savePath and jsonReadFile(savePath .. "/career/"..fileName)) or {}
end
@/lua/ge/extensions/career/saveSystem.lua
    local dir, filename, ext = path.split(folders[i])
    local data = jsonReadFile(dir .. filename .. "/info.json")
    if data then
    for i = 1, tableSize(folders) do
      local data = jsonReadFile(folders[i] .. "/info.json")
      if oldest then

  local data = jsonReadFile(savePath .. "/info.json")
  if data then
@/lua/ge/extensions/editor/dynamicDecals/brushes.lua
  if FS:fileExists(brushesPath) then
    brushes = jsonReadFile(brushesPath)
  else
@/lua/ge/extensions/core/trafficSignals.lua
local function resetControllerDefinitions() -- resets vital controller definitions back to default
  controllerDefinitions = jsonReadFile('settings/trafficSignals.json')
  if not controllerDefinitions then
  if FS:fileExists(filePath) then
    local defs = jsonReadFile(filePath)
    if defs then
  if FS:fileExists(filePath) then
    local data = jsonReadFile(filePath)
    if data then
@/lua/ge/extensions/editor/sensorConfigurationEditor.lua
      local vid = vehicle.vid
      local loadedJson = jsonReadFile(data.filepath)
      local d = loadedJson.data and lpack.decode(loadedJson.data) or techUtils.tableToVec3Recursive(loadedJson)
@/lua/ge/extensions/editor/sidewalkSpline.lua
              local preState = splineMgr.deepCopySidewalkSpline(selSpline)
              splineMgr.pasteSidewalkSplineProfile(selSpline, jsonReadFile(data.filepath))
              selSpline.isDirty = true
@/lua/ge/extensions/gameplay/rally/driveline/drivelineV3.lua

  local data = jsonReadFile(finalDrivelineFile)
  if not data or not data.points or #data.points < 2 then
@/lua/ge/extensions/scenario/scenarios.lua
local function loadStats (stats)
  local fileData = jsonReadFile('settings/playerStatistics.json') or {}
  local data = fileData[scenario.scenarioName]
local function saveStats (stats)
  local data = jsonReadFile('settings/playerStatistics.json') or {}

      local configData = to.partConfig and to.partConfig ~= '' and jsonReadFile(to.partConfig)
      local paintData = to:getMetallicPaintData()
@/lua/ge/extensions/editor/api/preferencesRegistry.lua
  local fname = filename or DefaultPreferencesPath
  self.preferences = deepcopy(jsonReadFile(fname)) or {}
  if self.preferences.version ~= PreferencesFileFormatVersion then
function C:loadCategory(categoryName, filename)
  local json = jsonReadFile(filename) or {}
@/lua/ge/extensions/gameplay/crawl/saveSystem.lua

  local data = jsonReadFile(filename)
  if not data then
  -- Load from file
  local data = jsonReadFile(filePath)
  if not data then
        -- Load save data for this trail
        local saveData = jsonReadFile(saveFolder .. trailId .. ".json") or {}
@/lua/ge/extensions/core/hotlapping.lua
  if FS:fileExists(filePath) then
    local json = jsonReadFile(filePath)
    if json then
      if string.find(file, originalFilename) then
        local json = jsonReadFile(file)
        if json then
@/lua/ge/extensions/gameplay/rally/notebook/test/testNotebook.lua
  log('D', logTag, 'reading notebook file: ' .. notebookFname)
  local json = jsonReadFile(notebookFname)
  if not json then
@/lua/ge/extensions/career/modules/marketplace.lua
local function generatePersonality(buyer, _archetypes)
  local data = jsonReadFile("levels/west_coast_usa/facilities/negotiationPersonalities.json")
  if not data then return end

  local data = jsonReadFile(savePath .. "/career/marketplace.json")
  if data then
@/lua/ge/extensions/core/flowgraphManager.lua
local function loadManager(filepath, hidden, keepSavedDirs)
  local data = jsonReadFile(filepath)
  local mgr = require('/lua/ge/extensions/flowgraph/manager')(M)

        stateData.data = jsonReadFile(filename)
        stateData.path = path .. moduleName
  if not uniqueManagers[name] then
    local json = jsonReadFile("flowgraphEditor/"..name..".flow.json")
    if json then
@/lua/ge/extensions/gameplay/rally/recceSettings.lua

  local json = jsonReadFile(self.fname)
  if not json then
@/lua/ge/extensions/core/modmanager.lua
      log('I', 'initDB', "Version update found. Coming from version '" .. tostring(updatedFromVersion) .. "'")
      local modData = jsonReadFile(persistencyfile)
      local modsInstalled = (type(modData) == 'table' and type(modData.mods) == 'table' and not tableIsEmpty(modData.mods))
  local data = nil
  data = jsonReadFile(persistencyfile)
  if data then
    local infofile = path .. string.sub(filename, 0, -string.len(ext)-2) .. '.json'
    local data = jsonReadFile(infofile)
    if data then
@/lua/ge/extensions/gameplay/rally/tools/loopToolbox.lua
function C:loadSettings()
  self.settings = jsonReadFile(settingsFilePath)
  if self.settings then
@/lua/ge/extensions/editor/roadUtils.lua
  if filename == "" then return end
  local template = jsonReadFile(filename)
    local filename = road:getField("template", "")
    template = jsonReadFile(filename)
  end

  local template = jsonReadFile(filename)
  if not template then return end
  for k,filename in pairs(roadTemplateFiles) do
    local jsonData = jsonReadFile(filename)
    local matName = jsonData.roads[1].fields.Material
      if filename and filename ~= "" then
        local template = jsonReadFile(filename)
@/lua/ge/extensions/flowgraph/nodes/vehicle/special/vehicleAction.lua
  file = file or "vehicles/"..key.."/input_actions.json"
  local actions = jsonReadFile(file) or {}
  local sorted = {}
@/lua/ge/extensions/freeroam/organizations.lua
    for _,file in ipairs(FS:findFiles("gameplay/organizations/", '*.organizations.json', -1, false, true)) do
      local data = jsonReadFile(file)
      for orgId, orgData in pairs(data) do
@/lua/ge/extensions/core/input/actions.lua
    if active == tech_license.isAllowedActionsPath(path) then
      local vehicleActions = jsonReadFile(path)
      if vehicleActions == nil then
@/lua/ge/extensions/gameplay/speedTrapLeaderboards.lua
  for _, filePath in pairs(files) do
    local leaderboardFileData = jsonReadFile(filePath)
    if leaderboardFileData then
@/lua/ge/extensions/editor/resourceChecker/resourceUtil.lua
  elseif strEnds(fn, 'materials.json') then
    return jsonReadFile(fn) or {}
  end
local function removeFromForestJson(shape, foresData)
  local forestContent = jsonReadFile(foresData)
  if forestContent then
          log('I', '', 'Loading json material file '..fn )
          matTable[fn] = jsonReadFile(fn) or {}
        end
    log('I', '', 'Checking Info' )
    local meshNames9 = jsonReadFile("/levels/"..levelname.."/info.json")
    if meshNames9 then
      if FS:fileExists(file) then
        local materialFile = jsonReadFile(file) or {}
        for key,_ in pairs(mats) do
@/lua/ge/extensions/editor/crawlEditor/missionPortTool.lua

  local boundsData = jsonReadFile(boundsFile)
  local raceData = jsonReadFile(raceFile)
  local boundsData = jsonReadFile(boundsFile)
  local raceData = jsonReadFile(raceFile)
@/lua/ge/extensions/util/saveDynamicData.lua
    local filepath = "vehicles/" .. vehName .. "/info_" .. config .. ".touched"
    local data = jsonReadFile(filepath)
    if not data then
  -- Load the blacklisted vehicles
  local blackListFile = jsonReadFile("blacklist.json")
    log("I", logTag, "Couldn't find blacklist.json.")
    local defaultBlackListFile = jsonReadFile("blacklistDefault.json")
@/lua/ge/extensions/core/settings/settings.lua
    if ui_imgui and ui_imgui.ctx ~= nil then
      local imguiFonts = jsonReadFile('settings/imguiFonts.json') or {}
      local fontToApply = imguiFonts[appliedLanguage] or imguiFonts["default"]
        if FS:fileExists(infoFname) then
          local info = jsonReadFile(infoFname)
          if info and info.name then
    log('D', '', 'Loading platform-specific setings from: ' .. platformSettingsPath)
    local platformSettings = jsonReadFile(platformSettingsPath)
    if not platformSettings then
@/lua/ge/extensions/util/screenshotCreator.lua
local function loadCameraConfig()
  cameraConfigFile = jsonReadFile("/settings/thumbnailCameraConfig.json")
  if not cameraConfigFile or not next(cameraConfigFile) then
@/lua/ge/extensions/editor/dynamicDecals/debugSection.lua
      if FS:fileExists(matPath) then
        local data = jsonReadFile(matPath)
        local materialsUsed = settings.getUsedMaterialNames()
@/lua/ge/extensions/gameplay/rally/trafficExclusion.lua
  local path = require('/lua/ge/extensions/gameplay/race/path')("Temp Path")
  local content = jsonReadFile(racePathFile)
  if content then
@/lua/ge/extensions/editor/vehicleEditor/liveEditor/veFlexbodyDebug.lua
  if not initVehData then
    settings = jsonReadFile(settingsPath) or {}
    switchVehicle(vEditor.vehicle:getID())
@/lua/ge/extensions/gameplay/race/race.lua
  if not file then return end
  local json = jsonReadFile(file)
  if not json then
@/lua/ge/extensions/core/levels.lua
    -- so, enrich the data of the levels for the user interface below
    local info = jsonReadFile(l.infoPath) or {}
@/lua/ge/extensions/gameplay/rally/util.lua

  local json = jsonReadFile(notebookFname)
  if not json then
  local racePath = require('/lua/ge/extensions/gameplay/race/path')()
  racePath:onDeserialized(jsonReadFile(raceFname))
  local filename = cornerAnglesFname
  local json = jsonReadFile(filename)
  if json then
@/lua/ge/extensions/editor/api/dynamicDecals/textures.lua
  if sidecarFileExists(textureFilepath) then
    return jsonReadFile(textureFilepath .. sidecarExtension)
  else
  if FS:fileExists(sidecarFilePath) then
    local oldData = jsonReadFile(sidecarFilePath)
    if oldData.tags then
        if FS:fileExists(sidecarFilePath) then
          local oldData = jsonReadFile(sidecarFilePath)
          if oldData.tags then
@/lua/ge/extensions/career/modules/inventory.lua

  local saveInfo = jsonReadFile(savePath .. "/info.json")
  if not saveInfo or saveInfo.version < minimumVersion then return end
  for i = 1, tableSize(files) do
    local vehicleData = jsonReadFile(files[i])
    vehicleData.partConditions = deserialize(vehicleData.partConditions)

  local inventoryData = jsonReadFile(savePath .. "/career/inventory.json")
  local saveSlot, savePath = career_saveSystem.getCurrentSaveSlot()
  local data = jsonReadFile(savePath .. "/info.json")
  if not data then
@/gameplay/missionTypes/chase/customNodes/suspectAiNode.lua
    if defaultMode == 'racePath' and self.pinIn.racePathFile.value then -- follow waypoints
      local json = jsonReadFile(self.mgr:getRelativeAbsolutePath({self.pinIn.racePathFile.value, self.pinIn.racePathFile.value..".race.json"}))
      if json then
    elseif defaultMode == 'script' and self.pinIn.scriptAiFile.value then -- follow scriptAI
      local json = jsonReadFile(self.mgr:getRelativeAbsolutePath({self.pinIn.scriptAiFile.value, self.pinIn.scriptAiFile.value..".track.json"}))
      if json then
@/lua/ge/extensions/core/settings/graphic.lua

local overallQualityPresets = jsonReadFile("lua/ge/extensions/core/settings/settingsPresets.json")
@/lua/ge/extensions/campaign/photoSafari.lua
  if FS:fileExists(file) then
    M.photoSafariData = jsonReadFile(file)
    M.accept = true
@/lua/ge/extensions/editor/tech/roadArchitect/junctions.lua
    function(data)
      local loadedJson = jsonReadFile(data.filepath)
      local serJunction, pos, rot = loadedJson.junction, loadedJson.pos, loadedJson.rot
@/lua/ge/extensions/gameplay/drift/destination.lua
  pathData = require('/lua/ge/extensions/gameplay/race/path')("New Path")
  pathData:onDeserialized(jsonReadFile(data.filePath))
  if reversedFlag then
@/lua/ge/setSpawnpoint.lua
  levelName = levelName:lower() or core_levels.getLevelName(getMissionFilename()) -- select spawnpoint from level menu
  local data = jsonReadFile(M.settingsFilePath) or {}
  data.lastLevelName = levelName
  local levelName = levelName or core_levels.getLevelName(getMissionFilename())
  local levelInfo = jsonReadFile(path.getPathLevelInfo(levelName))
  if not levelInfo then
  levelInfo.spawnPoints = levelInfo.spawnPoints or {}
  local data = jsonReadFile(M.settingsFilePath) or {}
  data.levels = data.levels or {}
local function getLastLevelName()
  return (jsonReadFile(M.settingsFilePath) or {}).lastLevelName
end
@/lua/ge/extensions/editor/trafficManager.lua
  elseif sessionData.aiType == "script" then
    local script = jsonReadFile(aiData.scriptFile or "")
    if script then
      if editor.uiInputFile("Vehicle Group##trafficManager", options.vehicleGroupFile, nil, nil, {{"Vehicle group files", ".vehGroup.json"}}, im.InputTextFlags_EnterReturnsTrue) then
        local tempVehGroup = jsonReadFile(ffi.string(options.vehicleGroupFile))
        if tempVehGroup and tempVehGroup.data then
      if vehGroupFile:len() > 0 then
        vehGroup = jsonReadFile(vehGroupFile)
        if vehGroup and vehGroup.data then
        if im.Button("Check Variables") then
          local tempFg = jsonReadFile(sessionData.aiData.flowgraphFile)
          if tempFg then

  local data = jsonReadFile(filePath)
  if data then
      if data.signalsFile then
        signalsData = jsonReadFile(data.signalsFile) or data.signals
      end
@/lua/ge/extensions/flowgraph/nodes/gameplay/traffic/fileVehicleGroup.lua

    self.vehGroup = jsonReadFile(file)
    if self.vehGroup.generator or not self.vehGroup.data then -- group generator exists, or custom data not exists
@/lua/ge/extensions/career/modules/insurance/insurance.lua

  driverScoreTiers = jsonReadFile("gameplay/insurance/driverScoreTiers.json").tiers

  availableCoverageOptions = jsonReadFile("gameplay/insurance/coverageOptions/coverageOptions.json").coverageOptions
  local perks = jsonReadFile("gameplay/insurance/perks/perks.json").perks
  availableCoverageOptions = jsonReadFile("gameplay/insurance/coverageOptions/coverageOptions.json").coverageOptions
  local perks = jsonReadFile("gameplay/insurance/perks/perks.json").perks
  for _, insuranceProviderFileName in ipairs(insuranceProvidersFileNames) do
    local insuranceInfo = jsonReadFile(insuranceProviderFileName)
    availableInsurances[insuranceInfo.id] = insuranceInfo
  for _, className in ipairs(classesFileNames) do
    local classInfo = jsonReadFile(className)
    availableClasses[classInfo.id] = classInfo
  -- load player data
  local savedPlInsuranceData = (savePath and jsonReadFile(savePath .. "/career/"..plInsuranceDataFileName..".json")) or {}
  local saveInfo = savePath and jsonReadFile(savePath .. "/info.json")
  local savedPlInsuranceData = (savePath and jsonReadFile(savePath .. "/career/"..plInsuranceDataFileName..".json")) or {}
  local saveInfo = savePath and jsonReadFile(savePath .. "/info.json")
  local isFirstLoadEver = not savedPlInsuranceData.invVehs or saveInfo.version < career_saveSystem.getSaveSystemVersion()
@/lua/ge/extensions/career/modules/logbook.lua
  if not saveSlot then return end
  local data = {}--(savePath and jsonReadFile(savePath .. "/career/"..fileName)) or {}
  logbook = data.logbook or {}
@/lua/ge/extensions/scenario/quickRaceLoader.lua
  local res = {}
  local supportedList = jsonReadFile('/levels/driver_training/scenarios/quickRaceProcedural/tracks.json')
  local scenData = jsonReadFile('/levels/driver_training/scenarios/career_prototype_gymkhana.json')[1]
  local supportedList = jsonReadFile('/levels/driver_training/scenarios/quickRaceProcedural/tracks.json')
  local scenData = jsonReadFile('/levels/driver_training/scenarios/career_prototype_gymkhana.json')[1]
      newLevel.levelName = levelName
      newLevel.levelInfo =  jsonReadFile('/levels/'..levelName..'/info.json') -- this contains the level info for the UI!
  --   local name = fn:sub(1,#fn - #e - 1)
  --   local read = jsonReadFile(name)
  -- end
  if FS:fileExists(filename) then
    local read = jsonReadFile(filename)
    if not read then
    if ext == 'json' or ext == 'race.json' then
      local file = jsonReadFile(trackFile)
      if not file then
@/lua/ge/extensions/career/modules/milestones/milestones.lua

  local data = (savePath and jsonReadFile(savePath .. "/career/"..saveFile)) or {}
  M.saveData = data
@/lua/ge/extensions/editor/trafficSignalsEditor.lua
  fileName = fileName or editor.levelPath.."signals.json"
  local data = jsonReadFile(fileName)
  if data then
      table.clear(signalCtrlDefinitions.types)
      tableMerge(signalCtrlDefinitions, jsonReadFile(editor.levelPath.."signalControllerDefinitions.json") or {}) -- loads only custom data, and only from the current level
      signalCtrlDefinitions._update = true
@/lua/ge/extensions/editor/assemblySpline.lua
              local preState = splineMgr.deepCopyAssemblySpline(selSpline)
              splineMgr.pasteAssemblySplineProfile(selSpline, jsonReadFile(data.filepath))
              editor.history:commitAction("Load Assembly Spline Template", { old = preState, new = splineMgr.deepCopyAssemblySpline(selSpline) }, splineMgr.objectSelectUndo, splineMgr.objectSelectRedo, true)
@/lua/ge/extensions/editor/resourceChecker.lua
            log('D', '', 'Detected modified material file '..k )
            local materialFile = jsonReadFile(k) or {}
            for l,b in pairs(v) do
@/lua/ge/extensions/freeroam/levelStats.lua
local function getStats()
  statsCache = statsCache or jsonReadFile(statsFilePath) or { levels = {}, vehicles = {} }
  statsCache.levels = statsCache.levels or {}
@/lua/common/utils.lua
function readDictJSONTable(filename)
  local data = jsonReadFile(filename)
  if not data then return nil end
@/lua/ge/extensions/gameplay/rally/transcripts/path.lua

  local json = jsonReadFile(self.fname)
  if not json then
@/lua/ge/extensions/ui/uiNavi.lua
  if FS:fileExists(getMissionFilename()) then
    info = jsonReadFile(getMissionFilename())
    if info.spawnPoints then