Railgun

if it ain't broke, we'll break it

User Tools

Site Tools


senses:packages:kmj-json

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
senses:packages:kmj-json [2025/07/28 01:43] – new format flashsenses:packages:kmj-json [2025/07/28 03:26] (current) – args & rets on same level as syntax flash
Line 13: Line 13:
   decode(input: string): (output: any)   decode(input: string): (output: any)
  
-=== Arguments ===+==== Arguments ====
  
   - The first argument should contain the JSON encoded representation of a type.   - The first argument should contain the JSON encoded representation of a type.
  
-=== Return values ===+==== Returns ====
  
   - The first return value will be the decoded Lua equivalent value type of the given JSON, or ''nil'' if the input could not be interpreted successfully.   - The first return value will be the decoded Lua equivalent value type of the given JSON, or ''nil'' if the input could not be interpreted successfully.
Line 29: Line 29:
   encode(input: any): (output: string|nil)   encode(input: any): (output: string|nil)
  
-=== Arguments ===+==== Arguments ====
  
   - The first argument should contain the Lua value that should be JSON encoded. Accepted Lua types are //nil//, //boolean//, //number//, //string// and //table//.   - The first argument should contain the Lua value that should be JSON encoded. Accepted Lua types are //nil//, //boolean//, //number//, //string// and //table//.
  
-=== Return values ===+==== Returns ====
  
   - The first return value will be the JSON encoded representation of the given input, or a Lua ''nil'' if an unsupported value such as //function//, //userdata// or //thread// was given.   - The first return value will be the JSON encoded representation of the given input, or a Lua ''nil'' if an unsupported value such as //function//, //userdata// or //thread// was given.
  
senses/packages/kmj-json.txt · Last modified: by flash