I'm getting the following JSONException when JSON serializing a Map of generic Objects which contains a Url object deeply nested within.
System.JSONException: Type unsupported in JSON: common.apex.methods.ApexUrl$URIImpl
It looks like Apex doesn't support JSON serializing the Url class because I was able to replicate the error in Anonymous Apex simply with
What would be the best way to serialize my object without having to refactor my Url properties to String? For some context, I'm serializing the Map described in this question.