Skip to main content
Jump to: navigation, search


Revision as of 07:13, 29 August 2011 by (Talk | contribs) (Data Type Reference)


The RAP Protocol is the JSON-based format used within the HTTP-Requests from a RAP-client to a RAP-server. Compared with the previously used JavaScript and HTTP-fields based communication is will provide a number of advantages:

  • It allowes to move all client-specific code from the server to the client.
  • It produces human readable messages, easing debugging.
  • It allowes the client to create more informative error messages.
  • It allowes to replace either ends as long as they process and create valid RAP-protocol messages.

The protocol is currently beeing developed in CVS HEAD. While not fully implemented, the communication will be mixed between old and new format, e.g. JavaScript-code with embedded JSON-objects. We expect to fully switch to the new format (at least the client-to-server direction) with the 1.5 release.

Protocol Format

The protocol is based on the JSON fromat as described here: [ ]


  "meta" : MetaObject,
  "operations" : [ (OperationObject)* ]

There is one message per request and one per response. (May differ while in development.)


  "requestCounter" : int



Data Type Reference

In additoin to the datatypes recognized by JSON itself, the RAP protocol also uses these composed types:


[ int left, int top, int with, int height ]

Note that left and top may be negative. No value may be null.


[ int red, int gree, int blue, int alpha ]

All values are to be between 0 and 255. The alpha value may be ignored by the client unless its 0.

Object Type Reference

Server and JavaScript-Client API

Back to the top