Skip to content

genius257/au3json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

au3json

A small JSON library for AutoIt3

usage

#include "json.au3"

$sJson = '{"name":"John","age":31,"city":"New York"}'

$oJson = _json_decode($sJson)

MsgBox(0, "", $oJson['name'])

; change value of $__g_json_sPrettyIndentation, to adjust identation in pretty print
ConsoleWrite(_json_encode_pretty($oJson)&@CRLF)

Error handling

When an error occurs in a JSON function, @error is set to non zero and a string describing the error with offset position is returned.

#include "json.au3"

$sJson = '{"name":"John","age"}'

$oJson = _json_decode($sJson)

If @error <> 0 Then
    ConsoleWriteError($oJson&@CRLF) ; Unexpected character: "}" at offset: 21
    Exit
EndIf

ConsoleWrite($oJson['name']&@CRLF)

Requirements

AutoIt version 3.3.14.0 or greater

About

A small JSON library for AutoIt3

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy