Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2011-11

?

4 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Dimitrios Chr. Ioannidis

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
Unknown author
to Dimitrios Chr. Ioannidis
Dimitrios Chr. Ioannidis wrote 15 lines
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 implementation was tested mostly with an ExtJS Ext.Direct client, and there the rules are slightly different.

Michael.

Dimitrios Chr. Ioannidis
to Unknown author

Hi Michael,

Show quoted text 23 lines
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 implementation was tested mostly with an ExtJS Ext.Direct client, and there the rules are slightly different.

if i 'fixed' the json 2.0 implementation will you accept the patches for the 2.6 release ? I'm asking cause i need to code a cgi app api for multiple json rpc clients which will be written in different languages, and i want to work with the most latest featured a stable fpc release i can.

regards,

Dimitrios Chr. Ioannidis
Unknown author
to Dimitrios Chr. Ioannidis
Dimitrios Chr. Ioannidis wrote 31 lines
Hi Michael, On 30/11/2011 6:38 μμ, wrote: > > > 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 implementation was tested mostly with an > ExtJS > Ext.Direct client, and there the rules are slightly different. if i 'fixed' the json 2.0 implementation will you accept the patches for the 2.6 release ? I'm asking cause i need to code a cgi app api for multiple json rpc clients which will be written in different languages, and i want to work with the most latest featured a stable fpc release i can.

We will try.

Michael.