json5

v0.1.1·Updated 2024-05-06

Exposes a module for parsing json5 using lovely

About this mod Author’s original text

JSON5

Exposes a lua module for reading json5 via lovely

Usage

-- Require gives a function table

json5 = require "json5"

-- Return a json encoded string from a given value (also valid json5)

json5.encode({ "oh", {hello = "world"}}) -- Returns '["oh",{"hello":"world"}]'

-- Returns a value representing a given json5 string

json5.decode("[1,2,3,{hello: 'world',},]") -- Returns {1,2,3,{hello = "world"}}

Install & use Install: follow the bundled instructions

  1. Unzip the archive from playbuff and read the bundled readme / instructions first.
  2. Most mods rely on the game's mod loader — the usual route is a community mod manager (such as r2modman): pick this game, install, and it handles the loader and dependencies.
  3. For a manual install, put the mod files into the matching Mod / plugins folder inside the game directory.
  4. Launch the game to confirm it loaded; mods with listed dependencies need those installed as well.

Install locations vary a lot between mods — the bundled readme is the most reliable guide. These mods need a community loader first — the bundled readme usually points to its download.

Dependencies

Install these first, or the mod will not work:

lovely

File & checksum

Filename
json5-0.1.1.zip
File size
549.5 KiB