diff options
Diffstat (limited to 'jsonpointer.py')
-rw-r--r-- | jsonpointer.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/jsonpointer.py b/jsonpointer.py index 53191ef..d353632 100644 --- a/jsonpointer.py +++ b/jsonpointer.py @@ -225,7 +225,11 @@ class JsonPointer(object): (parent, part) = self.to_last(doc) - parent[part] = value + if isinstance(parent, Sequence) and part == '-': + parent.append(value) + else: + parent[part] = value + return doc @classmethod |