✅ What is DataContractSerializer capable of serializing?
Hi! <:cat_hi:1123628423944867931>
I'm currently using
DataContractSerializer.WriteObject(...)
and DataContractSerializer.ReadObject(...)
to save and load my game data.
I was wondering if there was a list of all serializable types somewhere. It would be perfect if I was able to serialize things like Dictionaries, Vector2/Vector3, instead of converting them to multiple arrays...
Thank you for your help!12 Replies
P.S.: please mention me along with your response
what about json?
Wdym?
Oh, yeah, I understand. I said "game data", but wanted to say "player saves", sorry. 😅
is this what you're looking for?
This can solve my problem, but I wasn't able to use that one... If I remember correctly, it was due to security problems, or something else.. I can check, but there is no way to do it using DataContractSerializer, instead of convertir dictionaries to arrays?
security problems?
Yeah, something I found on https://learn.microsoft.com/
Microsoft Learn: Build skills that open doors in your career
Gain technical skills through documentation and training, earn certifications and connect with the community
Alright. Is JsonSerializer capable of Serializing classes?
Ok, was something else:
yeah it should
im sure there's other ways to store save data aside from json as well
not a game dev though <a:cat_no:768672517325717544>
Oh, good to know! Thanks!
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.