A user account is required in order to edit this wiki, but we've had to disable public user registrations due to spam.

To request an account, ask an autoconfirmed user on Chat (such as one of these permanent autoconfirmed members).

Validator.nu JSON Output: Difference between revisions

From WHATWG Wiki
Jump to navigation Jump to search
(Explain italics)
Line 14: Line 14:


====Message ''object''s====
====Message ''object''s====
A message ''object'' has one mandatory key, <code>"class"</code>, and seven optional keys, <code>"type"</code>, <code>"message"</code>, <code>"extract"</code>, <code>"extract-offset"</code>, <code>"url"</code>, <code>"line"</code> and <code>"column"</code>.


===The <code>"url"</code> ''string''===
===The <code>"url"</code> ''string''===

Revision as of 16:49, 11 September 2007

This is a draft of a Web service response format for Validator.nu for clients that prefer JSON over XML.

Italicized words, such as object, refer to JSON data types.

Root Object

The root object is a JSON object. It has two mandatory keys, "messages" and "result", and three optional keys, "url", "source" and "parse-tree".

The values for these keys are described below.

The "messages" array

The this array is an ordered collection of zero or more message objects.

Message objects

A message object has one mandatory key, "class", and seven optional keys, "type", "message", "extract", "extract-offset", "url", "line" and "column".

The "url" string

The "result" object

The "source" object

The "parse-tree" object

Processing Model

See also