Click here to Skip to main content
15,890,845 members

Comments by Rob Philpott (Top 200 by date)

Rob Philpott 1hr 20mins ago View    
Protocol Buffers?
Rob Philpott 2hrs 20mins ago View    
I've been doing a bit of this of late actually (JSON=>XML=>JSON). XML was always a hideous thing from the beginning with multiple ways to vaguely express the same thing and a single datatype of 'string'. I see it now more as an indication of the age of a system - it uses XML, it's old, it probably uses WinForms too. Mind you JSON has its faults (again very narrow type system - why oh why no dates?).

I don't mind WinForms actually. It's not pretty by modern standards but it's simple and it works. Sorry, I think I'm waffling. :)
Rob Philpott 21-Dec-23 10:16am View    
Yeah, I don't know actually - I don't think I've ever attempted to create a deep clone that can cope with any type, normally you have some insight about what you're cloning, members might be decorated for serialisation etc. Maybe some reflective approach might work, or some solution using expression trees for maximum performance. I found this - might be worth a go: https://stackoverflow.com/questions/129389/how-do-you-do-a-deep-copy-of-an-object-in-net
Rob Philpott 21-Dec-23 9:50am View    
Serialising to JSON and back out again is a pretty nasty way of cloning objects. Interesting you eventually run out of memory too, that suggests some sort of memory fragmentation otherwise the garbage collector should keep you running. What type goes into generic parameter T? Is it always the same, often different, could it be anything or do you have control over the types that go in there?
Rob Philpott 18-Jul-23 10:01am View    
As mentioned above, it appears to be the server that is disconnecting you. Could it be that its expecting a secure connection - TLS or something?