Open skbolton opened 1 month ago
I might be wrong on how the ergonomics of how the JSON module should work. It just feels interesting that the json module can only encode if working with a proto that might have been encoded and decoded using the top level encoder api and then ran through the json encoder.
Calling encode with a datetime properly casts to a Google.Timestamp
But calling the JSON module to encode results in an error
It seems that
Protobuf.JSON.Encode.encodable
doesn't have a clause to handle DateTimes. Is there a reason for this? Would a PR be accepted to handle DateTimes?