diff --git a/packtivity/datamodels/purejson.py b/packtivity/datamodels/purejson.py index 931d88a..e669b8d 100644 --- a/packtivity/datamodels/purejson.py +++ b/packtivity/datamodels/purejson.py @@ -50,7 +50,7 @@ def leafs(self): else: ptrs = [ jsonpointer.JsonPointer.from_parts(parts) - for parts in self.jq("leaf_paths", multiple_output=True).typed() + for parts in self.jq("paths(scalars)", multiple_output=True).typed() ] for p in ptrs: yield p, p.get(self.typed()) diff --git a/packtivity/typedleafs.py b/packtivity/typedleafs.py index c869156..7d66075 100644 --- a/packtivity/typedleafs.py +++ b/packtivity/typedleafs.py @@ -215,7 +215,7 @@ def leafs(self): else: ptrs = [ jsonpointer.JsonPointer.from_parts(parts) - for parts in self.jq("leaf_paths", multiple_output=True).typed() + for parts in self.jq("paths(scalars)", multiple_output=True).typed() ] for p in ptrs: yield p, p.get(self.typed()) diff --git a/packtivity/utils.py b/packtivity/utils.py index 1774d15..e03e6d2 100644 --- a/packtivity/utils.py +++ b/packtivity/utils.py @@ -32,7 +32,7 @@ def leaf_iterator(jsonable): if not isinstance(jsonable, (list, dict)): yield jsonpointer.JsonPointer(""), jsonable else: - allleafs = jq.jq("leaf_paths").transform(jsonable, multiple_output=True) + allleafs = jq.jq("paths(scalars)").transform(jsonable, multiple_output=True) leafpointers = [jsonpointer.JsonPointer.from_parts(x) for x in allleafs] for x in leafpointers: yield x, x.get(jsonable) diff --git a/setup.py b/setup.py index 458fc9a..b72ace3 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ "glob2", "jsonpointer", "jsonpath-rw", - "jq", + "jq>=1.0.0", "yadage-schemas", "mock", "checksumdir",