libubox/sh
Jo-Philipp Wich bd388d2b6c jshn: do not collapse whitespace in json_load()
When running the test case below the $key variable holds "foo bar" instead
of the expected "foo  bar".

-- 8< --
. /usr/share/libubox/jshn.sh
json_init
json_load '{ "key": "foo  bar" }'
json_get_var key key
-- >8 --

Quote the output of the "jshn -r" backtick expression to prevent the shell
from erroneously collapsing whitespace.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2014-07-16 20:36:13 +02:00
..
jshn.sh jshn: do not collapse whitespace in json_load() 2014-07-16 20:36:13 +02:00