On 27 Jan 2012, at 6:09 PM, Mikael Syska wrote:

> Thanks, this seems to work, but ran into some problems, not sure who
> to blame :-)
> 
> Using Newtonsoft.Json to serialize my .NET class ... and it works.
> Should be valid json:
> {"retries":0,"task":"process-quarantine","args":{"use_alt":false,"altrecipients"
> :"","learn":true,"salearn_as":"spam","todelete":false,"release":false,"message_i
> d":["37EC6193BEA.A97A0"]},"expires":null,"eta":null,"id":"f23cf671-c3a5-4637-b9a
> 3-b45a54e88663"}
> 
> The celery process however dont like it at all ... it throws an
> Exception and its because of the format of the above json.
> 
> {"retries":0,"task":"process-quarantine","args":[{"use_alt":false,"altrecipients
> ":"","learn":true,"salearn_as":"spam","todelete":false,"release":false,"message_
> id":["37EC6193BEA.A97A0"]}],"expires":null,"eta":null,"id":"f23cf671-c3a5-4637-b
> 9a3-b45a54e88663"}
> 
> Its having problems ... but if I take the json and take the "args" and
> surround it with [], then it works.
> 
> Heres the .NET code: https://gist.github.com/1689498
> 
> It could be me that are doing something wrong ..... but both apears to
> be valid if http://jsonlint.com/ can be trusted.

I have only limited computer access at the moment so cannot really check the 
code for
you, i will when i get back home on monday.

--
www.baruwa.org



_______________________________________________
Keep Baruwa FREE - http://pledgie.com/campaigns/12056

Reply via email to