Archived Boards > WinBatch Script Exchange

JSON API for querying TVDB and IMDB

<< < (3/3)

stanl:
Maybe a bit off topic, but Powershell has built in REST capabilities and json conversions. Sometimes as simple as 1 line

--- Code: ---$j = Invoke-WebRequest -Uri http://gomashup.com/json.php?fds=geo/usa/zipcode/state/NC | ConvertFrom-Json

--- End code ---

and Powershell works well with WB

td:
There are numerous JSON .Net assemblies available that might be used with WinBatch CLR hosting and avoid using PowerShell - which is something WinBatch users have told us they wish to avoid.  But again, if a WinBatch user has moderate script writing skills, an inclination to learn and a bit of curiosity, rolling their own JSON handler is not difficult either. 

Perhaps a pure WinBatch JSON UDF library should be added to the Tech Database in the future.

stanl:
and for some json you can use WinHTTP and javascript.

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/tsleft.web+WinBatch/JSON/MSScriptControl+Parse~JSON~Using~Eval.txt

or just search for json in tech database where you will find examples for .net  Tony alluded to.

Final Note:  I remember someone posting the use of WB Binary Tags to process json. With enough parameters that could produce a well-thought UDF.

P.S. I'm not one of the WB users who didn't want to integrate Powershell, in fact, just the opposite and Deana helped me with a semi-generic script to run PS code from the WB CLR.

td:
Yes, there are JSON scripts in the Tech Database as already suggested previously in this topic's thread.    But the JSON standard is neither mysterious nor complicated and a good set of UDFs with minimal external dependencies has it advantages 

No one said you were "one of the WB users who didn't want to integrate Powershell" and Deana's assistance was based on WinBatch + PowerShell scripts I originally wrote.   The point was that based on user feedback many WinBatch users are not interested in solutions that involve PowerShell.   


kdmoyers:
<< Perhaps a pure WinBatch JSON UDF library should be added to the Tech Database in the future. >>

Man, that would be awesome!!
-Kirby

Navigation

[0] Message Index

[*] Previous page

Go to full version