SharpSerializer icon indicating copy to clipboard operation
SharpSerializer copied to clipboard

SharpSerializer Is failing when object has non existing properties

Open dmitry-web opened this issue 5 years ago • 2 comments

SharpSerializer Is failing when object has non existing properties. Just need to check if Dictionary has key line code here

dmitry-web avatar Jul 01 '19 12:07 dmitry-web

How fix it?

leotop avatar Aug 27 '19 09:08 leotop

How fix it?

Try to override SharpSerializer with your classes and check if key exists return _objectCache.Any(x => x.Key == referenceTarget.Reference.Id) ? _objectCache[referenceTarget.Reference.Id] : null;

dmitry-web avatar Aug 27 '19 10:08 dmitry-web