; JsonIsNull Example ; ------------------ ; Requires Extended mode. q$=Chr(34) ; Double-quote character, for building JSON text ; This hero has no guild yet - the save stores null for it save=ParseJson("{"+q+"player"+q+":"+q+"Aria"+q+","+q+"guild"+q+":null}") ; JsonIsNull is true only for a real JSON-null handle guild=JsonObjectGet(save,"guild") Print "guild handle = "+guild+" (a real handle, not zero)" Print "JsonIsNull(guild) = "+JsonIsNull(guild) player=JsonObjectGet(save,"player") Print "JsonIsNull(player) = "+JsonIsNull(player)+" ("+JsonText(player)+" is a string)" Print "" If JsonIsNull(guild) Print "Aria has not joined a guild yet." EndIf FreeJson player FreeJson guild FreeJson save Print "" Print "Press any key to close the example" WaitKey End