Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Can some explain how DecodeJSON works?

Asked by
devDave 50
9 years ago

I'm considering to start using it, but I'm not really picking it up.

http://wiki.roblox.com/index.php?title=JSON

1 answer

Log in to vote
2
Answered by
BlueTaslem 18071 Moderation Voter Administrator Community Moderator Super Administrator
9 years ago

JSON is a format for storing JavaScript objects.

These objects have strings as keys and values which are strings, numbers, booleans, or other JSON objects.

If you build a table with strings as keys, then it is equivalent to a JSON object.

JavaScript has a standard of representing these objects in strings that can be encoded and decoded. ROBLOX's decode and encode functions do this; essentially it means

encode(someTableObject) is someString;

decode(someString) is someTableObject

0
thx m8 +1 devDave 50 — 9y
Ad

Answer this question