W3C home > Mailing lists > Public > www-validator@w3.org > January 2010

Malformed JSON output format

From: Yaroslav Samchuk <yarcat@gmail.com>
Date: Wed, 27 Jan 2010 13:42:16 +0100
Message-Id: <CEB313C3-C45C-4957-B454-02AE031BBEF7@gmail.com>
To: www-validator@w3.org
When requesting the JSON output, returned data seems to be malformed:


{
     "url": "...",
     "messages": [

           {
               "lastLine": 24,
               "lastColumn": 185,
               "message": &amp; did not start a character reference.  
(&amp; probably should have been escaped as &amp;amp;.),
               "messageid": "html5",
               "explanation":     <p class="helpwanted">
       <a
         href="http://validator.w3.org/feedback.html?uri=http%3A%2F%2F...%2F;errmsg_id=html5#errormsg 
"
title="Suggest improvements on this error message through our feedback  
channels"
       >&#x2709;</a>
     </p>
,
               "type": "error"
           },
....

Note that "message" and "explanation" values aren't quoted.

Is it an expected behavior or am I doing something wrong? To get JSON  
output format, I append ";output=json" to the URL, as described at http://validator.w3.org/docs/users.html#Output

--
Best regards,
Yaroslav
Received on Wednesday, 27 January 2010 22:04:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:39 GMT