Json.Encode
From GMod Wiki
Revision as of 17:12, 31 August 2011 by TheFreeman193 (Talk | contribs)
| Function | |
| Syntax |
Json.Encode( Var data ) Where is this used? |
| Description: | |
| Encodes a variable. See Notes. | |
| Returns: | nil |
| Part of Library: | Json |
| Realm: |
|
| BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Json.Encode]Json.Encode [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Example
| Description | Encodes a table using Json |
|---|---|
| Used on | |
| Code | local t = { "var1" = 21, "var2" = 24 } Json.Encode(t); print( Json.Decode(t) ) |
| Output | "var1":21, "var2":24 |