mIRC Home    About    Download    Register    News    Help

Topic Options
#259682 - 10/01/17 10:26 PM JSON for mIRC v1.0 - Alpha
FroggieDaFrog Online
Hoopy frood

Registered: 16/04/10
Posts: 775
Loc: USA
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



Edited by FroggieDaFrog (10/01/17 11:45 PM)
_________________________
I am SReject
My Stuff

Top
#259691 - 12/01/17 02:06 PM Re: JSON for mIRC v1.0 - Alpha [Re: FroggieDaFrog]
FroggieDaFrog Online
Hoopy frood

Registered: 16/04/10
Posts: 775
Loc: USA
_________________________
I am SReject
My Stuff

Top
#259708 - 14/01/17 06:59 PM Re: JSON for mIRC v1.0 - Alpha [Re: FroggieDaFrog]
FroggieDaFrog Online
Hoopy frood

Registered: 16/04/10
Posts: 775
Loc: USA
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


Edited by FroggieDaFrog (14/01/17 06:59 PM)
_________________________
I am SReject
My Stuff

Top
#259715 - 16/01/17 12:34 AM JSON for mIRC v1.0.3-rc [Re: FroggieDaFrog]
FroggieDaFrog Online
Hoopy frood

Registered: 16/04/10
Posts: 775
Loc: USA
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


Edited by FroggieDaFrog (16/01/17 12:35 AM)
_________________________
I am SReject
My Stuff

Top