Skip to content

Handle JSON with AutoHotkey, RFC 8259 compliant

License

Notifications You must be signed in to change notification settings

vladdeSV/ahk-json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛑 Unsuitable for production until v1.0 is released.

ahk-json

ahk version json rfc

JSON handler for AutoHotkey; RFC 8259 compliant, tested rigorously, zero-dependency.

  • JSON.Parse(jsonString)
  • JSON.Stringify(data)

Example

Parsing JSON

input := '{"a": "foo", "b": null, "c": 13.37, "d": {"a": [1, 2, 3]}}'
data := JSON.Parse(input)

; these are equal
data['a'] == 'foo'
data['b'] == JSON.Null
data['c'] == 13.37
data['d']['a'][3] == 3

Outputting JSON

; using `data` from above example
output := JSON.Stringify(data)
output == '{"a":"foo","b":null,"c":13.37,"d":{"a":[1,2,3]}}'

output := JSON.Stringify(data, true) ; pretty print
output == '
(
{
    "a": "foo",
    "b": null,
    "c": 13.37,
    "d": {
        "a": [
            1,
            2,
            3
        ]
    }
}
)'

License

MIT © Vladimirs Nordholm

About

Handle JSON with AutoHotkey, RFC 8259 compliant

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published