projects
/
project
/
libubox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
jshn: introduce json_is_a() convenience function to check field types without using...
[project/libubox.git]
/
sh
/
jshn.sh
diff --git
a/sh/jshn.sh
b/sh/jshn.sh
index
0b0c754
..
39d5331
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" ]
+}