summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorville <ville@localhost>2009-10-04 20:34:20 +0000
committerville <ville@localhost>2009-10-04 20:34:20 +0000
commitf6c54a153a498c1acc1713828c7770ccc5bbc0d7 (patch)
tree1ca865d35732c061070fbc3321c36fb03c4ece72
parentd7ec42c0d6decdb284bed2c5f8d9f64829999efd (diff)
downloadmarkup-validator-f6c54a153a498c1acc1713828c7770ccc5bbc0d7.zip
markup-validator-f6c54a153a498c1acc1713828c7770ccc5bbc0d7.tar.gz
markup-validator-f6c54a153a498c1acc1713828c7770ccc5bbc0d7.tar.bz2
Fix JSON syntax when some info is missing.
-rw-r--r--share/templates/en_US/json_output.tmpl10
1 files changed, 5 insertions, 5 deletions
diff --git a/share/templates/en_US/json_output.tmpl b/share/templates/en_US/json_output.tmpl
index 05af48c..0aba910 100644
--- a/share/templates/en_US/json_output.tmpl
+++ b/share/templates/en_US/json_output.tmpl
@@ -10,13 +10,13 @@ X-W3C-Validator-Warnings: <TMPL_VAR NAME="valid_warnings_num"></TMPL_IF>
"messages": [
<TMPL_LOOP NAME="file_errors">
{
- "type": <TMPL_IF NAME="err_type_err">"error"<TMPL_ELSE>"info"<TMPL_IF NAME="err_type_warn">,
- "subtype": "warning"</TMPL_IF></TMPL_IF>,
"lastLine": <TMPL_VAR NAME="line">,
- "lastColumn": <TMPL_VAR NAME="char">,
+ <TMPL_IF NAME="char">"lastColumn": <TMPL_VAR NAME="char">,</TMPL_IF>
"message": <TMPL_VAR NAME="msg">,
- "messageid": "<TMPL_VAR NAME="num">",
- "explanation": <TMPL_VAR NAME="expl">
+ <TMPL_IF NAME="num">"messageid": "<TMPL_VAR NAME="num">",</TMPL_IF>
+ <TMPL_IF NAME="expl">"explanation": <TMPL_VAR NAME="expl">,</TMPL_IF>
+ "type": <TMPL_IF NAME="err_type_err">"error"<TMPL_ELSE>"info"<TMPL_IF NAME="err_type_warn">,
+ "subtype": "warning"</TMPL_IF></TMPL_IF>
}<TMPL_UNLESS NAME="__last__">,</TMPL_UNLESS>
</TMPL_LOOP>
],