summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGordon P. Hemsley <me@gphemsley.org>2014-01-14 23:18:50 -0500
committerBastien Nocera <hadess@hadess.net>2014-03-31 15:58:15 +0200
commitacb7222ada2ad165a84d0bd33f2af1a93b43d3a8 (patch)
treee4853dc3403de608215a7102786019fa9441ae52
parentffbe705bb4035c8511df341005125933cb91b9ee (diff)
Add JSON mime-type
As application/json. https://bugs.freedesktop.org/show_bug.cgi?id=73646
-rw-r--r--freedesktop.org.xml.in8
-rw-r--r--tests/json_array.json22
-rw-r--r--tests/json_object.json13
-rw-r--r--tests/list3
4 files changed, 46 insertions, 0 deletions
diff --git a/freedesktop.org.xml.in b/freedesktop.org.xml.in
index 459a2ab..4350437 100644
--- a/freedesktop.org.xml.in
+++ b/freedesktop.org.xml.in
@@ -2177,6 +2177,14 @@ command to generate the output files.
<generic-icon name="text-x-script"/>
<glob pattern="*.js"/>
</mime-type>
+ <mime-type type="application/json">
+ <_comment>JSON document</_comment>
+ <acronym>JSON</acronym>
+ <expanded-acronym>JavaScript Object Notation</expanded-acronym>
+ <sub-class-of type="application/javascript"/>
+ <generic-icon name="text-x-script"/>
+ <glob pattern="*.json"/>
+ </mime-type>
<mime-type type="application/x-jbuilder-project">
<_comment>JBuilder project</_comment>
<generic-icon name="x-office-document"/>
diff --git a/tests/json_array.json b/tests/json_array.json
new file mode 100644
index 0000000..2a0cb68
--- /dev/null
+++ b/tests/json_array.json
@@ -0,0 +1,22 @@
+[
+ {
+ "precision": "zip",
+ "Latitude": 37.7668,
+ "Longitude": -122.3959,
+ "Address": "",
+ "City": "SAN FRANCISCO",
+ "State": "CA",
+ "Zip": "94107",
+ "Country": "US"
+ },
+ {
+ "precision": "zip",
+ "Latitude": 37.371991,
+ "Longitude": -122.026020,
+ "Address": "",
+ "City": "SUNNYVALE",
+ "State": "CA",
+ "Zip": "94085",
+ "Country": "US"
+ }
+]
diff --git a/tests/json_object.json b/tests/json_object.json
new file mode 100644
index 0000000..c99cd79
--- /dev/null
+++ b/tests/json_object.json
@@ -0,0 +1,13 @@
+{
+ "Image": {
+ "Width": 800,
+ "Height": 600,
+ "Title": "View from 15th Floor",
+ "Thumbnail": {
+ "Url": "http://www.example.com/image/481989943",
+ "Height": 125,
+ "Width": "100"
+ },
+ "IDs": [116, 943, 234, 38793]
+ }
+}
diff --git a/tests/list b/tests/list
index cce1436..10cfe55 100644
--- a/tests/list
+++ b/tests/list
@@ -217,6 +217,9 @@ bug-30656-xchat.conf text/plain x
helloworld.java text/x-java ox
# Copied from http://asurvey.net/ccsfagent/media/survey.js
survey.js application/javascript ox
+# The following two copied from RFC 4627.
+json_object.json application/json ox
+json_array.json application/json ox
test.cs text/x-csharp ox
test.dot text/vnd.graphviz x
test.vala text/x-vala ox