I was getting lots of errors in my Express-based REST API due to invalid Json payloads being posted to my endpoint.
Express just throws an exception, but it doesn’t give you the raw payload to see what is causing the error.
I dug into the source code of the body parser and it revealed this simple trick to get the raw payload in req.rawBody:

<br /> app.use(express.bodyParser({<br /> verify: function(req, res, buf, encoding) {<br /> req.rawBody = buf.toString(encoding);<br /> }<br /> }));<br />


draft-kelly-json-hal-05 – JSON Hypertext Application Language

There is an emergence of non-HTML HTTP applications (“Web APIs”) which use hyperlinks to direct clients around their resources.
The JSON Hypertext Application Language (HAL) is a standard which establishes conventions for expressing hypermedia controls, such as links, with JSON [RFC4627]. HAL is a generic media type with which Web APIs can be developed and exposed as series of links. Clients of these APIs can select links by their link relation type and traverse them in order to progress through the application.
HAL’s conventions result in a uniform interface for serving and consuming hypermedia, enabling the creation of general-purpose libraries that can be re-used on any API utilising HAL.
The primary design goals of HAL are generality and simplicity. HAL can be applied to many different domains, and imposes the minimal amount of structure necessary to cover the key requirements of a hypermedia Web API


jaql – Query Language for JavaScript Object Notation (JSON)

Jaql is a query language designed for Javascript Object Notation (JSON), a data format that has become popular because of its simplicity and modeling flexibility. Jaql is primarily used to analyze large-scale semi-structured data. Core features include user extensibility and parallelism. In addition to modeling semi-structured data, JSON simplifies extensibility. Hadoop’s Map-Reduce is used for parallelism.


Json.NET

Json.NET library makes working with JSON formatted data in .NET simple. Key features include a flexible JSON serializer to for quickly converting .NET classes to JSON and back again, and LINQ to JSON for reading and writing JSON.


wycats’s jquery-offline at master – GitHub

The jQuery offline plugin provides an easy mechanism for retrieving JSON data from a remote server, and then caching it. Subsequent requests for the same URL will retrieve the data from the cache, rather than the remote server.

If the user is online, the plugin will transparently request new content from the remote server, firing the callback again if the content has changed. If the user is offline, the plugin will request the data from the remote server for the most recent request when the user comes back online.

jQuery Offline uses the HTML5 localStorage API for persistence. You can use the same API for browsers that do not support localStorage, jQuery Offline will simply fall back to making a request to the server each time. As a result jQuery.retrieveJSON is a portable way to make a request for JSON that should be cached if possible.


DBSlayer

The DBacesslayer aka DBSlayer aka Släyer (as we like to call it when we’re feeling ironically heavy metal) is a lightweight database abstraction layer suitable for high-load websites where you need the scalable advantages of connection pooling. Written in C for speed, DBSlayer talks to clients via JSON over HTTP, meaning it’s simple to monitor and can swiftly interoperate with any web framework you choose.


Understanding jQuery UI widgets: A tutorial

“Widget” to me means a user-interface element, like a button or something more complicated like a popup date picker, but in jQuery UI terms it means a class, members of which are associated with HTML elements; things like Draggable and Sortable. In fact, not everything that I would have called a widget uses $.widget; the UI datepicker does not.

A great tutorial on how to write jqueryUI widgets


Persevere

The Persevere project is an open source set of tools for persistence and distributed computing using intuitive standards-based JSON interfaces of HTTP REST, JSON-RPC, JSONPath, and HTTP Channels. The core of the Persevere project is the Persevere Server. The Persevere server includes a Persevere JavaScript client, but the standards-based interface is intended to be used with any framework or client.


oEmbed

oEmbed is a format for allowing an embedded representation of a URL on third party sites. The simple API allows a website to display embedded content (such as photos or videos) when a user posts a link to that resource, without having to parse the resource directly.


RESTful JSON

REST doesn’t just apply to XML formats and that it\’s possible to use JSON RESTfully and not just in the old patterns.
Theory is nice, but working code is nicer. So let’s walk through building a RESTful service using JSON.


Triplr

Getting RDF data on the web can be hard to convince people to do, or to do correctly (see RSS). This service helps convert formats as need be and lets you access embedded RDF via GRDDL (such as microformats when they have a transformation) without the need to pre-process it yourself.

Everything that Triplr generates is available via a simple GET at a URI, so you can cut and paste them, ‘wget’ or ‘curl’ them and thus easily get the data into into your own web application without additional code.

Load More