你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

CloudEvent.ParseMany(BinaryData, Boolean) Method

Definition

Given JSON-encoded events, parses the event envelope and returns an array of CloudEvents. If the specified event is not valid JSON an exception is thrown. By default, if the event is missing required properties, an exception is thrown though this can be relaxed by setting the skipValidation parameter.

public static Azure.Messaging.CloudEvent[] ParseMany(BinaryData json, bool skipValidation = false);
static member ParseMany : BinaryData * bool -> Azure.Messaging.CloudEvent[]
Public Shared Function ParseMany (json As BinaryData, Optional skipValidation As Boolean = false) As CloudEvent()

Parameters

json
BinaryData

An instance of BinaryData containing the JSON for one or more CloudEvents.

skipValidation
Boolean

Set to true to allow missing or invalid properties to still parse into a CloudEvent. In particular, by setting strict to true, the source, id, specversion and type properties are no longer required to be present in the JSON. Additionally, the casing requirements of the extension attribute names are relaxed.

Returns

An array of CloudEvent instances.

Applies to