Page 1 of 1

JSON

Posted: 25 Feb 2014, 08:42
by elmo
Built in JSON would be valuable.

StrToObj()
ObjToStr()

Re: v2-thoughts Discussion

Posted: 25 Feb 2014, 20:05
by lexikos
Also totally irrelevant.
AutoHotkey v2 wrote:AutoHotkey v2 aims to improve the usability and convenience of the language and command set by sacrificing backward compatibility.

Re: v2-thoughts Discussion

Posted: 27 Feb 2014, 15:49
by elmo
Hmmm... Can't tell if the irrelevant comment relates to the immediately preceding JSON thought or not.

Assuming it relates to something else... ;) These are two examples with files and xml for which a JSON equivalent "seems" useful:

Code: Select all

FileRead   , varInRam , Filename
FileAppend , varInRam , Filename , Encoding

xmlVarInRam       := ComObjCreate("MSXML2.DOMDocument.6.0")
xmlVarInRam.async := false
xmlVarInRam.load( xmlFilename )
xmlVarInRam.save( xmlFilename )
So maybe:

Code: Select all

JSONread   , objectInRam , Filename
JSONappend , objectInRam , Filename

jsonObjectInRam.load( jsonFilename )
jsonObjectInRam.save( jsonFilename )
I have tried a few of the JSON function suites with varying degrees of success because they all work differently. So IMHO it would cool if AHK_L could read and write standard JSON. So sorry if this the wrong section to suggest.

Re: v2-thoughts Discussion

Posted: 27 Feb 2014, 17:22
by lexikos
My comment wasn't qualified with anything else, so obviously was in reference to the post immediately preceding it. Adding JSON-parsing support can be done at any time without breaking compatibility, so is irrelevant for v2.