Garry's Mod Wiki

Garry's Mod Wiki

  table or nil util.JSONToTable( string json, boolean ignoreLimits = false, boolean ignoreConversions = false )

Description

Converts a JSON string to a Lua table. It supports comments and trailing commas.

See util.TableToJSON for the opposite function.

Colors will not have the color metatable.

Issue Tracker: 2407

Arguments

1 string json
The JSON string to convert.
2 boolean ignoreLimits = false
ignore the depth and breadth limits, use at your own risk!.
If this is false, there is a limit of 15,000 keys total.
3 boolean ignoreConversions = false
ignore string to number conversions for table keys.
if this is false, keys are converted to numbers wherever possible. This means using Player:SteamID64 as keys won't work.

Returns

1 table or nil
The table containing converted information. Returns nil on failure.

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...