Garry's Mod Wiki

Revision Difference

util.JSONToTable#512269

<function name="JSONToTable" parent="util" type="libraryfunc">⤶ <description>⤶ Converts a JSON string to a Lua table.⤶ ⤶ <warning>This function converts keys to numbers whenever possible.</warning>⤶ <bug issue="3561">This will attempt cast the string keys "inf", "nan", "true", and "false" to their respective Lua values. This completely ignores nulls in arrays.</bug>⤶ </description>⤶ <realm>Shared and Menu</realm>⤶ <args>⤶ <arg name="json" type="string">The JSON string to convert.</arg>⤶ </args>⤶ <rets>⤶ <ret name="" type="table">The table containing converted information. Returns nothing on failure.</ret>⤶ </rets>⤶ </function>⤶ ⤶