Home

Awesome

JSON and Jxon

JSON lib for AutoHotkey

Requirements: Latest version of AutoHotkey (v1.1+ or v2.0-a+)

Version: v2.1.1 (updated 01/30/2016)

License: WTFPL


JSON.ahk (class)

Works on both AutoHotkey v1.1 and v2.0a

Installation

Use #Include JSON.ahk or copy into a function library folder and use #Include <JSON>.


.Load()

Parses a JSON string into an AHK value

Syntax:

value := JSON.Load( text [, reviver ] )

Return Value:

An AutoHotkey value (object, string, number)

Parameter(s):


.Dump()

Converts an AHK value into a JSON string

Syntax:

str := JSON.Dump( value, [, replacer, space ] )

Return Value:

A JSON formatted string

Parameter(s):


Jxon.ahk (function)

Similar to the JSON class above just implemented as a function. Unlike JSON (class) above, this implementation provides reading from and writing to file(Removed Jxon_Read and Jxon_Write). Works on both AutoHotkey v1.1 and v2.0a

Installation

Use #Include Jxon.ahk or #Include <Jxon>. Must be copied into a function library folder for the latter.


Jxon_Load()

Deserialize src (a JSON formatted string) to an AutoHotkey object

Syntax:

obj := Jxon_Load( ByRef src [ , object_base := "", array_base := "" ] )

Parameter(s):


Jxon_Dump()

Serialize obj to a JSON formatted string

Syntax:

str := Jxon_Dump( obj [ , indent := "" ] )

Return Value:

A JSON formatted string.

Parameter(s):