When saving a layer in AGOL with a large amount of custom symbology, the "Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property" error message is shown.