summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-07-26 14:53:00 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-07-26 15:41:04 -0400
commit57b2c5d0eefa883bd77a846af41c30e108c6aa9b (patch)
treedb16c7911943d7f6f0151015b62ab988d9931ff7 /doc
parent6f8a19e034476e83cc2a52f661475ee54d8cabd6 (diff)
saner format for metadata --json
metadata --json output format has changed, adding a inner json object named "fields" which contains only the fields and their values. This should be easier to parse than the old format, which mixed up metadata fields with other keys in the json object. Any consumers of the old format will need to be updated. This adds a dependency on unordered-containers for parsing MetaData from JSON, but it's a free dependency; aeson pulls in that library.
Diffstat (limited to 'doc')
-rw-r--r--doc/git-annex-metadata.mdwn10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/git-annex-metadata.mdwn b/doc/git-annex-metadata.mdwn
index fe344ff5e..b4e790080 100644
--- a/doc/git-annex-metadata.mdwn
+++ b/doc/git-annex-metadata.mdwn
@@ -71,6 +71,16 @@ When run without any -s or -t parameters, displays the current metadata.
Enable JSON output. This is intended to be parsed by programs that use
git-annex. Each line of output is a JSON object.
+ The format of the JSON objects changed in git-annex version 6.20160726.
+
+ Example of the new format:
+
+ {"command":"metadata","file":"foo","key":"...","fields":{"author":["bar"],...},"note":"...","success":true}
+
+ Example of the old format, which lacks the inner fields object:
+
+ {"command":"metadata","file":"foo","key":"...","author":["bar"],...,"note":"...","success":true}
+
* `--all`
Specify instead of a file to get/set metadata on all known keys.