I was just wondering why the choice of Expressions to implement serialize? #258
-
It makes it a little hard for me when i'm trying to debug and find the source of a null pointer... Though, to be fair, i think its because im using nullable ints in 48, it seems to die when i step through the debug assembly soon after reading from the int? property ( first item of an array of record types, within my top level contract type) But honestly i have no clue because it's just hopping all over the place. I am using a debug version that i built, so just figured i'd ask here. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Looks like it is registering the schema btw, but having issues when writing bytes for int? field nested within object within an array of objects, within the main object... |
Beta Was this translation helpful? Give feedback.
-
Expressions are indeed used for performance reasons. Reflection is relatively slow; by building serializers as expression trees, the serializer builder is able to do the expensive reflection work once up front and return a delegate that performs as well as a hand-written serializer. If you can provide a full stack trace, we may be able to help determine the cause of your issue. |
Beta Was this translation helpful? Give feedback.
Expressions are indeed used for performance reasons. Reflection is relatively slow; by building serializers as expression trees, the serializer builder is able to do the expensive reflection work once up front and return a delegate that performs as well as a hand-written serializer.
If you can provide a full stack trace, we may be able to help determine the cause of your issue.