Added switch for serializeAs feature.