mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-07-08 05:55:18 +02:00
read boolean values from json
This commit is contained in:
@@ -67,6 +67,13 @@ get_json_int_value() {
|
|||||||
sed -n "${filter}"
|
sed -n "${filter}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Get boolean value from json
|
||||||
|
get_json_bool_value() {
|
||||||
|
local filter
|
||||||
|
filter="$(printf 's/.*\[%s\]\s*\([^"]*\)/\\1/p' "$(json_path "${1:-}" "${2:-}")")"
|
||||||
|
sed -n "${filter}"
|
||||||
|
}
|
||||||
|
|
||||||
# JSON.sh JSON-parser
|
# JSON.sh JSON-parser
|
||||||
# Modified from https://github.com/dominictarr/JSON.sh
|
# Modified from https://github.com/dominictarr/JSON.sh
|
||||||
# Original Copyright (c) 2011 Dominic Tarr
|
# Original Copyright (c) 2011 Dominic Tarr
|
||||||
|
|||||||
Reference in New Issue
Block a user