Interpret json with batch

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
hacxx
Posts: 57
Joined: 09 Apr 2015 13:18

Interpret json with batch

#1 Post by hacxx » 20 Feb 2021 11:54

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

ShadowThief
Expert
Posts: 1160
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

Re: Interpret json with batch

#2 Post by ShadowThief » 20 Feb 2021 13:23

There's nothing natively because batch predates JSON, but you could use jq or PowerShell.

hacxx
Posts: 57
Joined: 09 Apr 2015 13:18

Re: Interpret json with batch

#3 Post by hacxx » 20 Feb 2021 15:56

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

penpen
Expert
Posts: 1991
Joined: 23 Jun 2013 06:15
Location: Germany

Re: Interpret json with batch

#4 Post by penpen » 21 Feb 2021 08:01

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

jfl
Posts: 226
Joined: 26 Oct 2012 06:40
Location: Saint Hilaire du Touvet, France
Contact:

Re: Interpret json with batch

#5 Post by jfl » 21 Feb 2021 11:40

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.

Post Reply