Re: [LEDE-DEV] jshn.sh: json_load replaces "-" with "_"

2017-10-30 Thread Matthias Schiffer
On 10/30/2017 09:58 PM, Paul Spooren wrote: > On 10/30/17 3:28 AM, Matthias Schiffer wrote: >> On 10/29/2017 09:21 PM, Paul Spooren wrote: >>> Hi all, >>> >>> I'm currently trying to use jshn.sh but it changes the data and makes it >>> unusable. >>> >>> Below an example: >>> >>> root@LEDE:~# json_s

Re: [LEDE-DEV] jshn.sh: json_load replaces "-" with "_"

2017-10-30 Thread Paul Spooren
On 10/30/17 3:28 AM, Matthias Schiffer wrote: > On 10/29/2017 09:21 PM, Paul Spooren wrote: >> Hi all, >> >> I'm currently trying to use jshn.sh but it changes the data and makes it >> unusable. >> >> Below an example: >> >> root@LEDE:~# json_string="{ \"foo-bar\": 10 }" >> root@LEDE:~# echo $json_

Re: [LEDE-DEV] jshn.sh: json_load replaces "-" with "_"

2017-10-29 Thread Matthias Schiffer
On 10/29/2017 09:21 PM, Paul Spooren wrote: > Hi all, > > I'm currently trying to use jshn.sh but it changes the data and makes it > unusable. > > Below an example: > > root@LEDE:~# json_string="{ \"foo-bar\": 10 }" > root@LEDE:~# echo $json_string > { "foo-bar": 10 } > root@LEDE:~# json_init >

[LEDE-DEV] jshn.sh: json_load replaces "-" with "_"

2017-10-29 Thread Paul Spooren
Hi all, I'm currently trying to use jshn.sh but it changes the data and makes it unusable. Below an example: root@LEDE:~# json_string="{ \"foo-bar\": 10 }" root@LEDE:~# echo $json_string { "foo-bar": 10 } root@LEDE:~# json_init root@LEDE:~# json_load "$json_string" root@LEDE:~# json_dump { "foo_