[WIP] Replace to_hash with as_json#32
Conversation
|
How/where was to_hash being used previously? I understand it's for deserialization, but I'm not sure I fully understand how that particular method comes into play. I also don't understand the nuances of |
It was used for serializing these objects to json, there was a bug where |
I was thinking it would follow the rails |
|
Oh that's interesting - don't think I've seen as_json before, but it seems the benefit there is that it allows hiding things in ActiveModel via options. 🤔 |
Follow-up to https://github.com/ManageIQ/rbvmomi2/pull/29/files#r1062876312
@Fryguy I wonder if
#as_jsonmight be better sinceString#as_jsonreturns aStringjust wanted to throw this up to start the coversation