Garry's Mod Wiki

util.JSONToTable

table util.JSONToTable( string json )

Description

Converts a JSON string to a Lua table.

This function converts keys to numbers whenever possible. It also has a limit of 15000 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

Arguments

1 string json
The JSON string to convert.

Returns

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

Page Links


Special Pages


Wikis

?

Render Time: 29ms

DB GetPage 5
Generate Html 2
SaveChanges (1) 8
Render Body 0
Render Sidebar 10