[fpc-devel] Error at TCustomJSONRPCDispatcher.FormatResults ?

michael.vancanneyt at wisa.be michael.vancanneyt at wisa.be
Wed Nov 30 17:38:16 CET 2011



On Wed, 30 Nov 2011, Dimitrios Chr. Ioannidis wrote:

> Hi all,
>
>  in the function TCustomJSONRPCDispatcher.FormatResult the 
> Result:=TJSONObject.Create(['result',Return,'error',TJSonNull.Create,transactionproperty,ID.Clone]); 
> i think that should be checked if jdoJSONRPC2 is enabled and remove the 
> 'error' member.
>
>   From the http://jsonrpc.org/spec.html "error This member is REQUIRED on 
> error. This member MUST NOT exist if there was no error triggered during 
> invocation. The value for this member MUST be an Object as defined in section 
> 5.1."
>
> Also i forgot to add that at the end of the same paragraph titled "5 Responce 
> object" stated that "Either the result member or error member MUST be 
> included, but both members MUST NOT be included.".

I will have a look at it. The implementation was tested mostly with an ExtJS
Ext.Direct client, and there the rules are slightly different.

Michael.



More information about the fpc-devel mailing list