AutoHotkey Community

It is currently May 26th, 2012, 7:34 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 27 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: December 21st, 2008, 3:11 pm 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7502
Location: Australia
Thanks. The current behaviour is adequate for my use - always 'name':number. """name"":" expression repeated several times didn't appeal to me.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 7th, 2009, 8:35 am 
Offline

Joined: February 11th, 2007, 4:10 pm
Posts: 185
Thanks for the wonderful work, but I have some questions:
1.
what's meaning of (?-1)? reference in the opposite direction?
And what about q2 == "*" ?
And it doesn't need to escaped { } [ + in [^{}] , [^[\]] , ([+\-]?)?

2.
if the object string includes a ".", how to refer to it? For instance:
Code:
js = {"a.b.c":123}


3.
Quote:
z += p + StrLen(x2) - 2

should be
Quote:
z += p + StrLen(x2) + 2


4.
Quote:
If (!p := RegExMatch(j, "(?<!\\)(""|')([^\1]+?)(?<!\\)(?-1)\s*:\s*((\{(?:[^\{\}]++|(?-1))*\})|(\[(?:[^\[\]]++|(?-1))*\])|"
. "(?<!\\)(""|')[^\7]*?(?<!\\)(?-1)|[+\-]?\d+(?:\.\d*)?|true|false|null?)\s*(?:,|$|\})", x, p))

The red part should be [^\7] or [^\6]?

5. There're a lot of problems about array such as that it can get but can't set the value of array correctly.

Do you have a plan to update this function? If the parsing can be improved, then AHK will own a powerful and flexible function about associative array or table like LUA's.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 18th, 2009, 1:44 am 
Offline

Joined: June 24th, 2009, 1:37 am
Posts: 23
I tried both the links in the first post of this thread to downlod json.ahk but neither link works. The more recent one comes up with a blank page.

Can anyone help?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 18th, 2009, 7:01 pm 
Try from Titan's Scripts.

HTH


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 18th, 2009, 7:14 pm 
Offline

Joined: June 24th, 2009, 1:37 am
Posts: 23
The bare link to json.ahk on that page also yielded an empty file, but opening it from the HTTP SVN link worked.

Thanks!!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 24th, 2010, 11:29 pm 
Offline

Joined: March 19th, 2009, 5:08 pm
Posts: 548
Location: Texas, USA
Hott!

_________________
Aren't you glad that I didn't put an annoying gif here?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 25th, 2010, 9:16 am 
Offline

Joined: February 11th, 2007, 4:10 pm
Posts: 185
If someone rewrites it with AHK_L, converts json to object, it must be more powerful, flexible and efficient. I wait it :)
btw: AutoIt3 owns a udf library with full funtions


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 29th, 2010, 5:00 pm 
Offline

Joined: July 25th, 2010, 2:17 pm
Posts: 13
Curiously, does the json parser handle comments?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 29th, 2010, 5:05 pm 
Offline
User avatar

Joined: August 11th, 2004, 1:47 am
Posts: 5347
Location: UK
The JSON spec doesn't cover comments. If you mean JavaScript comments in JSON code then you can easily remove them with a simple regex.

_________________
GitHubScriptsIronAHK Contact by email not private message.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 5th, 2010, 12:01 pm 
Offline

Joined: July 25th, 2010, 2:17 pm
Posts: 13
Thank you for the simple explanation, and for the JSON function, I've been having a lot of fun with it. :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 1st, 2010, 8:45 pm 
I'll paste some new AHK code for JSON parsing, importing and exporting,
and easy accessing as soon as I'll be able to post it complete. :?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 12th, 2010, 10:00 pm 
Offline

Joined: December 12th, 2010, 9:30 pm
Posts: 30
Here is it

http://www.autohotkey.com/forum/viewtopic.php?t=66070


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 27 posts ]  Go to page Previous  1, 2

All times are UTC [ DST ]


Who is online

Users browsing this forum: bobbysoon, jrav and 11 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group