Reminder: When you need help, please be specific and remember to tell us:

Reminder: When you need help, please be specific and remember to tell us:

– Version of Delphi incl. ver.no (D5, D2006, XE3, XE8, Seattle 10.0.x, Berlin 10.1.x, Tokyo 10.2.x, etc.)

– SKU (Community, Pro, Enterprise, Architect)

– Platform (Windows, iOS, Android, Linux)

– Tech (console, VCL, FMX, etc)

– Database platform (ADO, dbExpress, FireDAC, etc)

– Database (MSSQL, MySQL, Oracle, SQLite, etc)

Also see: https://plus.google.com/+LarsFosdal/posts/NarwjyzC4rN

What is the difference between a .

What is the difference between a .dres and a .res file, and when was the .dres file introduced? Can I control whether a resource goes to app.dres vs app.res ?

http://docwiki.embarcadero.com/RADStudio/Tokyo/en/File_Extensions_of_Files_Generated_by_RAD_Studio

page states

dres

Delphi compiled resource file. This extension is used when you add a resource to a project, such as an icon or image. The .dres file is only used at link time.

res, rc

Compiled and uncompiled resource files.

I need to write some DataSnap “middleware” between Google Glass and a SwissLog ERP system, and I am trying to figure…

I need to write some DataSnap “middleware” between Google Glass and a SwissLog ERP system, and I am trying to figure out if there are significant differences between running the DataSnap as a standalone service (or app, for debugging) – and running as a CGI ISAPI plugin for IIS on a standard Windows Server.

Will the CGI be invoked per http session – or will there be a shared session running continously? I’ve never worked with CGI ISAPI before, so this is definitively a learning “opportunity”.

Pointers to relevant documentation would be appreciated.

Noob question:

Noob question:

Is there a cleaner way to insert a JsonRPC request handler into a TWebModule?

Note – Insert as an action in code, and not at design time.

procedure TWebModule1.WebModule1DefaultHandlerAction(Sender: TObject;

Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);

begin

if (Request.MethodType = mtPost) and (Request.ContentType = ‘application/json’) and (Request.PathInfo = ‘/’)

then begin

JsonRPC.Invoke(Sender, Request, Response, Handled);

end

else begin

Response.Content := {“”,””}

” +

‘Nothing to see’ +

‘Move along’ +

”;

end;

end;

Wandering about for the first time in the Json classed of Berlin, I have a few questions from a noob perspective,…

Wandering about for the first time in the Json classed of Berlin, I have a few questions from a noob perspective, which I hope someone with experience can enlighten me on.

I am implementing the JsonRPC protocol, where a request basically looks like this:

{

“jsonrpc”:”2.0″,

“method”:”JSon.MethodName”,

“params”: {

“aIntParam”: 100,

“aStrParam”:”A string”

},

“Id”: “UniqueIdValue”

}

I.e. The method name may vary, and with it the “params” – or implicitly, the type of the JSon object that recides in “params”. The challenge here is that I don’t know the type, until I have identified the content of “method”.

Using TJSon, it is trivial to get the value – but relatively costly, since it will also parse “params” – which can be large and complex.

// property fields omitted for brevity

class TJSonRPC = class

public

property jsonrpc: String;

property method: String;

property params: String;

property id: String;

end;

And if I parse

var

rpc: TJsonRPC;

begin

rpc := TJSon.JsonToObject(ReceivedJsonString);

“rpc” will contain the correct string values in the “jsonrpc”, “method” and “id” fields – while “params” will be an empty string, since it was an unknown object type.

I use “method” to look up the associated “params” type, as well as the handler methods. Now I have to reparse the whole thing again – instead of avoiding the first parsing of params, and then only parsing params with the right type later.

So, after this long intro – my question is: Can I persuade TJSon to treat “params” as it was a string and not an object for the TJsonRPC class?