in src/WebJobs.Extensions.Http/Utility.cs [17:50]
internal static void ApplyBindingData(object value, Dictionary<string, object> bindingData)
{
try
{
// if the input value is a JSON string, extract additional
// binding data from it
string json = value as string;
if (!string.IsNullOrEmpty(json) && Utility.IsJson(json))
{
// parse the object adding top level properties
JObject parsed = JObject.Parse(json);
var additionalBindingData = parsed.Children<JProperty>()
.Where(p => p.Value != null && (p.Value.Type != JTokenType.Array))
.ToDictionary(p => p.Name, p => ConvertPropertyValue(p));
if (additionalBindingData != null)
{
foreach (var item in additionalBindingData)
{
if (item.Value != null)
{
bindingData[item.Key] = item.Value;
}
}
}
}
}
catch
{
// it's not an error if the incoming message isn't JSON
// there are cases where there will be output binding parameters
// that don't bind to JSON properties
}
}