Created
November 21, 2010 22:29
-
-
Save immutef/709230 to your computer and use it in GitHub Desktop.
REST response formats [DRAFT]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
</head> | |
<body data-version="1.0"> | |
<section role="errors"> | |
<article data-code="404"> | |
Not found | |
</article> | |
</section> | |
<section role="results"> | |
<article id="1">...</article> | |
<article id="2">...</article> | |
</section> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ "version":"1.0" | |
, "errors":[{"code":"404","message":"Not found"}] | |
, "results":[{"id":"1", ...}, {"id":"2", ...}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<response> | |
<version>1.0</version> | |
<errors> | |
<error> | |
<code>404</code> | |
<message>Not found</message> | |
</error> | |
</errors> | |
<results> | |
<item id="1">...</item> | |
<item id="2">...</item> | |
</results> | |
</response> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 1.0 | |
errors: | |
- { code: 404, message: Not found } | |
results: | |
- { id: 1, ... } | |
- { id: 2, ... } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment