summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--share/templates/en_US/json_ouput.tmpl30
1 files changed, 30 insertions, 0 deletions
diff --git a/share/templates/en_US/json_ouput.tmpl b/share/templates/en_US/json_ouput.tmpl
new file mode 100644
index 0000000..24fbe51
--- /dev/null
+++ b/share/templates/en_US/json_ouput.tmpl
@@ -0,0 +1,30 @@
+Content-Type: application/json; charset=UTF-8
+X-W3C-Validator-Recursion: <TMPL_VAR NAME="depth" DEFAULT="1"><TMPL_IF NAME="fatal_error">
+X-W3C-Validator-Status: Abort<TMPL_ELSE><TMPL_IF NAME="valid_status">
+X-W3C-Validator-Status: <TMPL_VAR NAME="valid_status"></TMPL_IF>
+X-W3C-Validator-Errors: <TMPL_VAR NAME="valid_errors_num">
+X-W3C-Validator-Warnings: <TMPL_VAR NAME="valid_warnings_num"></TMPL_IF>
+
+
+{
+ "url": "<TMPL_VAR NAME="file_uri">",
+ "messages": [
+ <TMPL_LOOP NAME="file_errors">
+ {
+ <TMPL_IF NAME="err_type_err">"type": "error",</TMPL_IF>
+ <TMPL_IF NAME="err_type_warn">"type": "warning",</TMPL_IF>
+ "lastLine": "<TMPL_VAR NAME="line">",
+ "firstColumn": "<TMPL_VAR NAME="char">",
+ "message": "<TMPL_VAR NAME="msg">",
+ "messageid": "<TMPL_VAR NAME="num">",
+ "explanation": "<TMPL_VAR NAME="expl">",
+ "extract":"<TMPL_VAR NAME="src">"
+ }
+ </TMPL_LOOP>
+
+ ],
+ "source": {
+ "encoding": "<TMPL_VAR NAME="file_charset">"
+ }
+}
+