RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Auto AnnotationBoosterCalibrate ESCCompile ImpostersCompile MeshesConfig List GeneratorDecal Roads EditorDependency TreeDoc CreatorVehicle ExporterFollow The White RabbitForest GeneratorGround Model DebugInput System UtilsInstanced Line Render DemoJBeam StatsLog StreamsMap TilesNode Beam ExportNode StreamPhotomodePrecompile ShadersPrecompile VehiclesProcedural Track GeneratorRectangle GeneratorRender Components APIResave MaterialsRich PresenceSave Dynamic DataScreenshot CreatorShowroomSort LinesStep HandlerTerrain GeneratorTest Extension ProxiesTest JSON Files SyntaxVehicle Rope DebugBatch WorkerWebSocket Test

UI

Resources

BeamNG Game Engine Lua Cheat SheetGE Developer RecipesMCP Server Setup

// RLS.STUDIOS=true

Premium Mods for BeamNG.drive. Career systems, custom vehicles, and immersive gameplay experiences.

Index

HomeProjectsPatreon

Socials

DiscordPatreon (RLS)Patreon (Vehicles)

© 2026 RLS Studios. All rights reserved.

Modding since 2024

API ReferenceGE Extensionsutil

Test JSON Files Syntax

Validates the syntax of every JSON, JBeam, and PC file in the game by attempting to decode each.

Validates the syntax of every JSON, JBeam, and PC file in the game by attempting to decode each.


Overview

util_testJSONFilesSyntax is a validation utility that scans the entire filesystem for .jbeam, .pc, and .json files and decodes each with jsonDebug.decode(). Parse errors and warnings are logged. This is used in CI/QA to catch malformed data files.

Extension path: lua/ge/extensions/util/testJSONFilesSyntax.lua


Exports (M)

FunctionSignatureDescription
onExtensionLoaded()Scans all JSON/JBeam/PC files and validates their syntax.

Internals

Validation

Uses jsonDebug module (a stricter JSON decoder that returns warnings):

local state, data, warnings = xpcall(
  function() return jsonDebug.decode(content, context) end,
  debug.traceback
)
  • Errors: Logged at 'E' level with the file path and error message.
  • Warnings: Logged at 'W' level (e.g., trailing commas, duplicate keys).

File Discovery

FS:findFiles('/', "*.jbeam\t*.pc\t*.json", -1, true, false)

Scans recursively from root, including all mod content.


How It Works

  1. Extension loads (typically via CLI).
  2. onExtensionLoaded finds all matching files.
  3. Each file is read and decoded.
  4. Errors and warnings are logged to console.

Lua Examples

-- Run as a batch validation tool:
-- beamng.exe -onLevelLoad_ext "util/testJSONFilesSyntax"

-- Or load manually to validate all files:
extensions.load("util/testJSONFilesSyntax")
-- Check console output for errors/warnings

Additional Exports

  • M.onExtensionLoaded - (undocumented)

See Also

  • Auto Annotation - Related reference
  • Booster - Related reference
  • Calibrate ESC - Related reference
  • Game Engine Overview - Guide

Test Extension Proxies

Demonstration/test extension showing how to use `newExtensionProxy` to fan out extension hooks to multiple object instances.

Vehicle Rope Debug

Reference for `extensions/util/vehicleRopeDebug.lua`. Provides an ImGui debug sandbox for visualizing and editing rope physics parameters on the current vehicle.

On this page

OverviewExports (M)InternalsValidationFile DiscoveryHow It WorksLua ExamplesAdditional ExportsSee Also