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

Paul Spooren spooren at informatik.uni-leipzig.de
Sun Oct 29 13:21:22 PDT 2017


Hi all,

I'm currently trying to use jshn.sh but it changes the data and makes it
unusable.

Below an example:

root at LEDE:~# json_string="{ \"foo-bar\": 10 }"
root at LEDE:~# echo $json_string
{ "foo-bar": 10 }
root at LEDE:~# json_init
root at LEDE:~# json_load "$json_string"
root at LEDE:~# json_dump
{ "foo_bar": 10 }

Expected would be the same output as input. Is this a bug or a feature?

Context:

Running snapshot build. I'm trying to use rpcd-mod-packagelist [1] but
as e.g. "kmod-r8169" becomes "kmod_r8169" it's useless.

Best,

Paul Spooren

[1]:
https://github.com/openwrt/packages/tree/master/utils/rpcd-mod-packagelist




More information about the Lede-dev mailing list