I suppose you could try wrapping the Parse method in a c# class that you compile on the fly or into an assembly that you load and call from WinBatch.
Or I suppose I could revert to COM and dig out an old function I dug up for a script I put together with Delev in 2012. It does a fair job with the JSON. but StrReplace() lines fail for invalid Null Character. I checked the tech db for removing nulls but cam up blank.
; Winbatch 2018A - Prepare address for REST API call
; Stan Littlefield - July 2, 2019
;
; Revision: CreateObject ("MSScriptControl.ScriptControl") used for JSON
; instead of .net class
;====================================================================================
gosub udfs
IntControl(73,1,0,0,0)
;using last known address for Antonio Banderas
url = 'https://geocode.xyz/'
fmts = '?json=1,?geoit=xml,?geoit=csv'
fmt = Itemextract(1,fmts,",")
address = 'Baum Halls - 8388 Wilshire Blvd., Ste. 444 - Beverly Hills, CA 90211'
ObjectClrOption("useany", "System")
oNet = ObjectClrNew('System.Net.WebUtility')
encoded = oNet.UrlEncode(address)
oNet=0
ObjectClrOption("useany", "System.Net.Http")
oClient = ObjectClrNew('System.Net.Http.HttpClient')
request = url:encoded:fmt
;FilePut(dirscript():'geocode.txt',request) ;used to make manual request to check encoding
success =0
For i = 1 To 10
response = oClient.GetAsync(request).Result
if Response.IsSuccessStatusCode
TaskStr = Response.Content.ReadAsStringAsync()
Ct=TaskStr.Result
;FilePut(dirscript():'results.txt',Ct)
If fmt== '?json=1'
Ct = GetJSON(Ct)
;Ct = StrReplace(Ct,"|",""}
;Ct = StrReplace(Ct,",","="}
;Ct = StrReplace(Ct,@LF,@CRLF}
FilePut(dirscript():'results.txt',Ct)
Pause("response",Ct)
Else
Pause( "response",Content)
Endif
success = 1
Break
Endif
Timedelay(1)
Next
If ! success Then Pause("response",Response.StatusCode)
oClient = 0
Exit
;====================================================================================
:WBERRORHANDLER
oClient=0
geterror()
Message("Error Encountered",errmsg)
Exit
;====================================================================================
:udfs
#DefineSubRoutine geterror()
wberroradditionalinfo = wberrorarray[6]
lasterr = wberrorarray[0]
handlerline = wberrorarray[1]
textstring = wberrorarray[5]
linenumber = wberrorarray[8]
errmsg = "Error: ":lasterr:@LF:textstring:@LF:"Line (":linenumber:")":@LF:wberroradditionalinfo
Return(errmsg)
#EndSubRoutine
#DefineFunction GetJSON(strJSON)
If strJSON == "" Then Return ""
objJSC = CreateObject ("MSScriptControl.ScriptControl")
objJSC.Language = "JScript"
objJSC.AddCode(: `function json2txt(obj,path){var txt='';for(var key in obj){if(obj.hasOwnProperty(key)){if('object'==typeof(obj[key])){txt+=json2txt(obj[key],path+(path?'|':'')+key);}else{txt+=path+'|'+key+','+obj[key]+'\n';}}}return txt;}`)
Return objJSC.Eval(: `json2txt(` : strJSON : `,'')`)
; JS code from Patrick Fisher at "http://stackoverflow.com/questions/10221229/list-all-keys-and-values-of-json" ; 2012-04-19T03:48:24.
#EndFunction
Return
;====================================================================================