You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Objects returned from function run is warpped into PSObject. Further more, the objects in a container object such as array/hastable may also wrapped into PSObject. This makes it not possible to directly use Newtonsoft.Json in the language worker to serailize object to JSON. We need to consider to use ConvertTo-Json for serailizatoin. For deserialization, it should be fine to directly use Newtonsoft.Json APIs.
Repro
run.ps1
param($req)
Write-Verbose"Processing a HTTP request"-Verbose
$output=@{}
$output["GUID1"] = (New-Guid).Guid
$output["GUID2"] = (New-Guid).Guid
# You associate values to output bindings by calling 'Push-OutputBinding'.return [HttpResponseContext]@{
StatusCode=202Body=$output
}
Objects returned from function run is warpped into
PSObject
. Further more, the objects in a container object such as array/hastable may also wrapped intoPSObject
. This makes it not possible to directly useNewtonsoft.Json
in the language worker to serailize object to JSON. We need to consider to useConvertTo-Json
for serailizatoin. For deserialization, it should be fine to directly useNewtonsoft.Json
APIs.Repro
run.ps1
function.json
Expected Behavior
Actual Behavior
The text was updated successfully, but these errors were encountered: