API:Class/HttpService/JSONDecode

JSONDecode

Function of HttpService.pngHttpService
Variant JSONDecode (
    string input
)
Parameters:
  1. input

Returns: Variant
Description: Decodes a JSON string into a Lua table. Does not require HttpEnabled to be true.

Example

If you have something which has been JSON encoded, such as ["a","b","c"], you can use this method to decode it into a Lua table.

myJSON = [=[["a","b","c"]]=]
hs = game:GetService("HttpService")
myTable = hs:JSONDecode(myJSON)
-- Yields a variable myTable table that looks like {"a", "b", "c"}

Tutorials Used In