CloudEvent.ParseMany(BinaryData, Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.