You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue is with the Guest object within the payload. The Guest object is not being deserialized properly. The QsrVehicle class is supposed to receive the Guest object in its constructor, but for some reason, it is always undefined. I tried using the "marshal" method with the type annotation, and it worked fine. Interestingly, if I change the Guest object's name to camel case (guest), and update the QsrVehicle class to receive guest instead of Guest (the property name), the deserialization works fine. However, I am not sure why the deserialization works for the SiteUID, Vehicle, and CheckNumber fields, even though they are also in Pascal case.
Hi guys, I'm having trouble deserializing a payload.
The issue is with the
Guest
object within the payload. TheGuest
object is not being deserialized properly. TheQsrVehicle
class is supposed to receive theGuest
object in its constructor, but for some reason, it is always undefined. I tried using the "marshal" method with thetype
annotation, and it worked fine. Interestingly, if I change theGuest
object's name to camel case (guest
), and update theQsrVehicle
class to receiveguest
instead ofGuest
(the property name), the deserialization works fine. However, I am not sure why the deserialization works for theSiteUID
,Vehicle
, andCheckNumber
fields, even though they are also in Pascal case.I have tried using a custom naming strategy to turn property names into camel case (and obviously I've also changed the class members to camel case), but it didn't work either. I have created a repro example, which you can find at https://github.com/juanda147/deepkit-test/blob/d31b86bfa11a65e30eb68aa06b75d20a3e7deb53/playground/Marshal/DeserializeGenericV2.ts#L345.
Thanks in advance!
The text was updated successfully, but these errors were encountered: