##- # Author: Brian Tiffin # Dedicated to the public domain # # Date started: October 2018 # Modified: 2018-10-22/23:23-0400 btiffin ##+ # # json-hello.icn, demonstrate the json.icn Unicon Class Library contribution. # By Gigi Young and Clinton Jeffery. # link json procedure main() # JSON string to Unicon table T := jtou("{\"To\": \"world\", \"Say\": \"Hello, \"}") write(T["Say"], T["To"]) # Unicon table to JSON string TU := table() TU["one"] := 1 TU["two"] := 2 TU["list"] := [1,2,3] TU["table"] := table() write("Unicon table in JSON: ", utoj(TU)) end