protected virtual object ConvertFromJson()

in src/Microsoft.Azure.WebJobs.Extensions.Dapr/Triggers/DaprTriggerBindingBase.cs [129:139]


        protected virtual object ConvertFromJson(JsonElement jsonElement, Type destinationType)
        {
            // Do a direct conversion by default
            var obj = JsonSerializer.Deserialize(jsonElement, destinationType);
            if (obj == null)
            {
                throw new InvalidOperationException($"Unable to convert {jsonElement} to {destinationType.Name}.");
            }

            return obj;
        }