-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
The json::object::parse_pair function calls getQuoted to parse object keys. This means that object::_data contains JSON-escaped keys.
This causes the following issue in timewarrior as of GothenburgBitFactory/timewarrior@bdb28fa:
$ timew start '"a'
Note: '"\"a"' is a new tag.
Tracking "\"a"
[…]
$ timew stop
Trying to decrement non-existent tag '"a'
After timew start is run, the tags.data file contains {"\"a":{"count":1}}. When running timew stop, libshared's parse_pair parses the key "\"a", but does not unescape it. This causes timewarrior not to find "a because the key is internally stored as \"a.
Possible solutions:
- Add a function to retrieve the key name in unescaped form and change timewarrior to use this function
- Change the internal representation of
_datato store the unescaped string
Possibly related to GothenburgBitFactory/timewarrior#159
Metadata
Metadata
Assignees
Labels
No labels