util.JSONToTable

From Garry's Mod
Jump to: navigation, search
 util.JSONToTable( )

Description

Converts a JSON string to a Lua table.

WARNING

This function converts keys to numbers whenever possible.

BUG

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

Arguments

string json

The JSON string to convert.

Returns

table

The table containing converted information. Returns nothing on failure.
Personal tools
Navigation