Garry's Mod Wiki


table util.JSONToTable( string json )


Converts a JSON string to a Lua table.

Keys are converted to numbers wherever possible. This means using Player:SteamID64 as keys won't work.
There is a limit of 15,000 keys total.
This will attempt cast the string keys "inf", "nan", "true", and "false" to their respective Lua values. This completely ignores nulls in arrays.

Issue Tracker: 3561
Colors will not have the color metatable.

Issue Tracker: 2407


1 string json
The JSON string to convert.


1 table
The table containing converted information. Returns nothing on failure.

Page Links

Special Pages



Render Time: 87ms

DB GetPage 47
Generate Html 4
SaveChanges (1) 18
Render Body 0
Render Sidebar 16