mIRC Home    About    Download    Register    News    Help

Print Thread
#259682 10/01/17 10:26 PM
Joined: Apr 2010
Posts: 969
F
Hoopy frood
OP Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
For those that use my JSON parser, I'm announcing that it has been updated. For those that don't know what I'm talking about take a look here.

Update
The script has been completely rewrote from the bottom up. It makes use of new features to mIRC and new methodologies learned since the v0.x series. Its faster while being less resource intensive.


Backwards Compatibility
Due to the massive amounts of internal changes this update breaks backwards compatibility. Fret not, though, as it's simple to update your scripts to use this version (and make use of its new features!):
  • To retrieve a referenced member's value, you MUST use the .value prop
  • /JSONURLGet has been renamed to /JSONHttpFetch
  • All /JSONURL* commands have been renamed to /JSONHttp
  • All .Url* props have been renamed to .Http*


New Features
  • /JSONOpen -U can be used to make HTTP requests without attempting to parse the body
  • $JSONForEach() can be used to loop over object/array members
  • Many new props to $JSON() have been added


Links
Download - Source - Docs - Bugs


Last edited by FroggieDaFrog; 10/01/17 11:45 PM.

I am SReject
My Stuff
Joined: Apr 2010
Posts: 969
F
Hoopy frood
OP Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969


I am SReject
My Stuff
Joined: Apr 2010
Posts: 969
F
Hoopy frood
OP Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
v1.0.1008-alpha Released
Docs Source Bugs


Added
v0.2.42 compatibility mode. While this feature will enable most scripts that make use of the older feature set to work, it is highly recommended that those scripts be updated. Once the majority of people have switched to using the v1.x feature-set this mode will most likely be removed. To turn on compatibility mode use: /JSONCompat

Added
On load check to make sure the client meets the minimum version required

Added
$JSONPath(@Name|Ref|N, N) : Returns various information about a reference's member-path.

Added
$JSONForEach(@Name|Ref|N, @Callback).walk : Recursively walks container-type members before calling the callback alias

Changes
HTTP errors are now prefixed with "HTTP: "

Fixed
/JSONHttpFetch -f failing failing to read from file
$JSON().ToFile not outputting the result to file

Last edited by FroggieDaFrog; 14/01/17 06:59 PM.

I am SReject
My Stuff
Joined: Apr 2010
Posts: 969
F
Hoopy frood
OP Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
v1.0.3000-rc Released
Docs Source Bugs

Added
Default headers when sending data with an URL/HTTP request. These headers are only applied if data is being sent and they have not been set via /JSONHttpHeader
Content-Length: set to the length of the data
Content-Type: set to "application/x-www-form-urlencoded"

Fixed
/JSONHttpFetch raising a switch error when it shouldn't
$JSONForEach() only accepting references returned by $JSON()

Change
HTTP requests now have hard timeouts to keep mIRC from freezing for an undue amount of time. Those timeouts are:
30 seconds to resolve the host
60 seconds to connect to the host
60 seconds between each packet sent while sending the request
60 seconds between each packet received while receiving the response

Last edited by FroggieDaFrog; 16/01/17 12:35 AM.

I am SReject
My Stuff

Link Copied to Clipboard