Built in JSON library

Propose new features and changes
iseahound
Posts: 1444
Joined: 13 Aug 2016, 21:04
Contact:

Built in JSON library

06 Apr 2018, 18:57

Considering that AHK's objects mimic JSON syntax, it seems reasonable to have built-in JSON support without resorting to a library. Another reason would be to enable the import and export of objects in AutoHotkey, something which is currently difficult to do.
User avatar
kczx3
Posts: 1640
Joined: 06 Oct 2015, 21:39

Re: Built in JSON library

10 Apr 2018, 18:44

+1,000,000

This is especially important since the recent changes in the v2 codebase which allows for an identical object declaration to JavaScript objects.
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: Built in JSON library

10 Apr 2018, 19:11

- I agree that this would be an important and worthwhile feature.
- This is addressed to anyone reading the thread: taking Coco's library as an example, how similar would/should any AutoHotkey implementation be to Coco's library. Should it have all of the functionality, just the core functionality, more functionality? Are there any aspects of the library that you would change?
JSON 2.0 (and Jxon) - JSON lib for AutoHotkey - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=627
- The library seems like the natural starting point from which to proceed. I've used JSON a fair amount, but not extensively, so I haven't critically reflected on all aspects of the library.
- Also, JSON could be useful for saving/loading objects from/to files, and inspecting objects.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
iseahound
Posts: 1444
Joined: 13 Aug 2016, 21:04
Contact:

Re: Built in JSON library

10 Apr 2018, 21:13

JSON is long overdue. AHK has no efficient way to import or export objects, which for a language based off automation is odd. Coco's library borrows syntax from Javascript's stringify(). I don't like the syntax, but there's no good reason to create our own - it's better to implement JSON exactly how Javascript implements it.

Return to “Wish List”

Who is online

Users browsing this forum: No registered users and 12 guests