RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

server/commands - Camera & Input Commandsge_utils - Game Engine Utility Functionsmain.lua - GE Lua Entry Point & Game Loopmap.lua - Navigation Graph (AI Road Map)screenshot.lua - Screenshot Systemserver/server - Level Loading & Game ServerserverConnection - Client-Server Connection Manager`setSpawnpoint` - Default Spawn Point Persistence`simTimeAuthority` - Simulation Time & Bullet Time Control`spawn` - Vehicle Spawning & Safe Placement`suspensionFrequencyTester` - Suspension Natural Frequency Analysis
Auto AnnotationBoosterCalibrate ESCCompile ImpostersCompile MeshesConfig List GeneratorDecal Roads EditorDependency TreeDoc CreatorExport (glTF)Follow The White RabbitForest GeneratorGround Model DebugInput System UtilsInstanced Line Render DemoJBeam StatsLog StreamsMap TilesNode Beam ExportNode StreamPhotomodePrecompile ShadersPrecompile VehiclesProcedural Track (Gymkhana Generator)Rectangle GeneratorRender Components APIResave MaterialsRich PresenceSave Dynamic DataScreenshot Creator (Vehicle Thumbnails)ShowroomSort LinesStep HandlerTerrain GeneratorTest Extension ProxiesTest JSON Files Syntaxutil/vehicleRopeDebug - Rope Physics Debug UIutil/worker - Batch Job Workerutil/wsTest - WebSocket Test Server

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)

Test Extension Proxies

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

util/vehicleRopeDebug - Rope Physics Debug UI

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 Exports