Skip to content

json verbatim

Dirk HOFFMANN requested to merge github/fork/ederag/json-verbatim into master

Created by: ederag

The custom fact signature used in the past was hard to extend. For instance timezone info addition would require a signature change.

Hence pass verbatim fact as a string in json format. Better change that now while no-one else uses the verbatim interface introduced in #466, about 3 months ago.

The replacement D-Bus method GetFactsJSON first argument is a range string, same syntax/parser as the command line. This parser understands a single hamster day, a day range, or a precise datetimes range.

This PR is fully backward compatible for the hamster-shell-extension, since that uses GetTodaysFacts and AddFact, not AddFactVerbatim. Added GetFactJSON and GetTodaysFactsJSON as well.

client.get_facts also should be backward compatible.

With c5178eb1 the range granularity for get_facts is improved. Now datetimes are understood (granularity: minute), in addition to hamster days (granularity: day, as previously).

Merge request reports

Loading