Page 1 of 1

Interpret json with batch

Posted: 20 Feb 2021 11:54
by hacxx
Hi,

I have develop a html file and i would like to know if is possible to manipulate a Json string in batch. Doing this to output json to text.

Thanks
---------------------------
Here is my batches & more:
http://cyberlord.at/forum/?id=10589

Re: Interpret json with batch

Posted: 20 Feb 2021 13:23
by ShadowThief
There's nothing natively because batch predates JSON, but you could use jq or PowerShell.

Re: Interpret json with batch

Posted: 20 Feb 2021 15:56
by hacxx
Thanks for the links, will do a visit soon...
This would be nice with some json apis that i have.

---------------------------
Here is my batches & more:
http://cyberlord.at/forum/?id=10589

Re: Interpret json with batch

Posted: 21 Feb 2021 08:01
by penpen
You could also use a hyprid jscript/batch; well, it's mainly a jscript and batch is only needed to start that, but in case you need a batch anyway, then that might be helpfull for you:
viewtopic.php?f=3&t=9049#p59297


penpen

Re: Interpret json with batch

Posted: 21 Feb 2021 11:40
by jfl
There's also this beautiful example that aGerman posted last month:
In "JSON file in wrong format" post #4
It is also a Batch/JScript hybrid, and the JScript part creates an HTML object, to use its JSON decoding capabilities.