API:Class/HttpService/JSONEncode

JSONEncode

Function of HttpService.pngHttpService
string JSONEncode (
    Variant<dictionary, array> input
)
Parameters:
  1. input

Returns: string
Description: Encodes 'input' into a JSON string. Does not require HttpEnabled to be true.

Example

HttpService = game:GetService("HttpService")
mytab = {"a","b","c"}
print(HttpService:JSONEncode(mytab))
["a","b","c"]

Tutorials Used In