Note that most common RESTful JSON uses a quite verbose format for the JSON content: see for example which proposed to put whole URL in the JSON content


I really prefer our implementation

which preserves bandwidth and human readibility: if you were able to send a GET request to the URL will be able to append this URL at the beginning of every future request, doesn't it make sense?

In all cases, our framework always returns the JSON content just as a pure response of a SQL query, with an array and field names.

Note that our JSON content has two layouts, which can be produced according to the TSQLRestServer.NoAJAXJSON property:

1. the "expanded" or standard/AJAX layout, which allows you to create pure JavaScript objects from the JSON content, because the field name / JavaScript object property name is supplied for every value:


2. the "not expanded" layout, which reflects exactly the layout of the SQL request: first line are the field names, then all next lines are the field content:

By default, the NoAJAXJSON property is set to TRUE in TSQLRestServer.ExportServerNamedPipe: if you use named pipes for communication, you probably won't use javascript because browser communicates via HTTP!

But otherwise, NoAJAXJSON property is set to FALSE. You could force its value to TRUE if you'd save some bandwidth and don't use javascript: even the parsing of the JSON Content will be faster with Delphi if JSON content is not expanded.

In this "not expanded" layout, the first JSON content of this post will be transfered as:


More details, and discussion to continue on our forum.