bonjour,
un exemple pour manipuler simplement du JSON en VBS/ASP
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8 Set htmlfile = CreateObject("htmlfile") htmlfile.write("<meta http-equiv=""x-ua-compatible"" content=""IE=9""/>") Set json = htmlfile.parentWindow.JSON jsondata = "{""animal"": ""baleine"",""espece"": ""moche et bossue"",""couleur"": ""bleue"",""âge"": 58}" Set objson = json.parse(jsondata) MsgBox objson.animal & " " & objson.espece MsgBox json.stringify(objson, null, "\t") htmlfile.close()
Partager