[fpc-devel] Error at TCustomJSONRPCDispatcher.FormatResults ?

Dimitrios Chr. Ioannidis d.ioannidis at artesoft.gr
Wed Nov 30 16:52:25 CET 2011


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.".

regards,
-- 
Dimitrios Chr. Ioannidis




More information about the fpc-devel mailing list