Jump to content

JSONgen (JSON generator) 1.0.0

   (0 reviews)

About This File

UDF to generate JSON.

Example:
#include "JSONgen.au3"

$oJson = New_Json()

; Let's add some stand-alone elements
Json_AddElement($oJson, "test") ; A string
Local $aArray[2] = ['hai', 'halo']
Json_AddElement($oJson, $aArray) ; An array

; Let's add some associative elements
Json_AddElement($oJson, "hey", 2.55)
Json_AddElement($oJson, "delete", "me") ; We will delete this one
Json_AddElement($oJson, "hoo", True)
Json_AddElement($oJson, "edit", "this") ; And edit this one

; Let's do some editing
Json_DeleteElement($oJson, "delete") ; Deleting that one
Json_EditElement($oJson, "edit", "that") ; Editing that one

; Let's now add an associated (non-associative) array :)
Local $aArray[2] = ['hey', 'bye']
Json_AddElement($oJson, 'array', $aArray)

; Now we get the JSON
$sTheJsonCode = Json_GetJson($oJson)

MsgBox(0, "Json code", $sTheJsonCode)

User Feedback

You may only provide a review once you have downloaded the file.

There are no reviews to display.

×
×
  • Create New...