projects
/
oweals
/
libubox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0795496
)
jshn: introduce json_is_a() convenience function to check field types without using...
author
Jo-Philipp Wich
<jow@openwrt.org>
Mon, 17 Dec 2012 12:54:45 +0000
(13:54 +0100)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Mon, 17 Dec 2012 12:54:45 +0000
(13:54 +0100)
sh/jshn.sh
patch
|
blob
|
history
diff --git
a/sh/jshn.sh
b/sh/jshn.sh
index 0b0c7549ab7d01175ad20130004557b277d89d26..39d53318fe5d5f4901a627021f1bc30b2b91a084 100644
(file)
--- a/
sh/jshn.sh
+++ b/
sh/jshn.sh
@@
-244,3
+244,10
@@
json_select() {
;;
esac
}
+
+json_is_a() {
+ local type
+
+ json_get_type type "$1"
+ [ "$type" = "$2" ]
+}