matcher: add user callback and support implicit index/key compares
[project/jsonpath.git] / matcher.h
index 4187241..5dc2869 100644 (file)
--- a/matcher.h
+++ b/matcher.h
 
 #include "parser.h"
 
+typedef void (*jp_match_cb_t)(struct json_object *res, void *priv);
+
 struct json_object *
-jp_match(struct jp_opcode *path, struct json_object *jsobj);
+jp_match(struct jp_opcode *path, struct json_object *jsobj,
+         jp_match_cb_t cb, void *priv);
 
 #endif