summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Henrie <alexhenrie24@gmail.com>2015-06-22 22:41:37 -0600
committerBastien Nocera <hadess@hadess.net>2015-07-10 15:47:23 +0200
commit7c82d47f1f280ad74e937f837bbc7d983fdbdf8e (patch)
treeebdc30bf2fc0d7dceebba26e8d469e6714e8c389
parent8141a4b0c91bf4a8a4c5b224f6e8e0c27012f0fe (diff)
downloadshared-mime-info-7c82d47f1f280ad74e937f837bbc7d983fdbdf8e.tar.gz
Add application/json-patch+json as subclass of application/json
https://bugs.freedesktop.org/show_bug.cgi?id=91064
-rw-r--r--freedesktop.org.xml.in8
-rw-r--r--tests/list2
-rw-r--r--tests/my-data.json-patch8
3 files changed, 18 insertions, 0 deletions
diff --git a/freedesktop.org.xml.in b/freedesktop.org.xml.in
index 9ce40210..f4ece72b 100644
--- a/freedesktop.org.xml.in
+++ b/freedesktop.org.xml.in
@@ -2220,6 +2220,14 @@ command to generate the output files.
<generic-icon name="text-x-script"/>
<glob pattern="*.jrd"/>
</mime-type>
+ <mime-type type="application/json-patch+json">
+ <_comment>JSON patch</_comment>
+ <acronym>JSON</acronym>
+ <expanded-acronym>JavaScript Object Notation</expanded-acronym>
+ <sub-class-of type="application/json"/>
+ <generic-icon name="text-x-script"/>
+ <glob pattern="*.json-patch"/>
+ </mime-type>
<mime-type type="application/ld+json">
<_comment>JSON-LD document</_comment>
<acronym>JSON-LD</acronym>
diff --git a/tests/list b/tests/list
index 4609e23e..7f1abcd9 100644
--- a/tests/list
+++ b/tests/list
@@ -224,6 +224,8 @@ json_object.json application/json ox
json_array.json application/json ox
# Copied from RFC 7033
webfinger.jrd application/jrd+json ox
+# Copied from RFC 6902
+my-data.json-patch application/json-patch+json ox
# Copied from http://www.w3.org/TR/json-ld/
json-ld-full-iri.jsonld application/ld+json ox
test.cs text/x-csharp ox
diff --git a/tests/my-data.json-patch b/tests/my-data.json-patch
new file mode 100644
index 00000000..623224f0
--- /dev/null
+++ b/tests/my-data.json-patch
@@ -0,0 +1,8 @@
+[
+ { "op": "test", "path": "/a/b/c", "value": "foo" },
+ { "op": "remove", "path": "/a/b/c" },
+ { "op": "add", "path": "/a/b/c", "value": [ "foo", "bar" ] },
+ { "op": "replace", "path": "/a/b/c", "value": 42 },
+ { "op": "move", "from": "/a/b/c", "path": "/a/b/d" },
+ { "op": "copy", "from": "/a/b/d", "path": "/a/b/e" }
+]