CborUtils.GetStringValueFromCborMapByKey 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.
Overloads
| Name | Description |
|---|---|
| GetStringValueFromCborMapByKey(Byte[], Int32) |
Reads a CBOR-encoded map and returns the text string value associated with the specified integer key. |
| GetStringValueFromCborMapByKey(Byte[], String) |
Reads a CBOR-encoded map and returns the text string value associated with the specified key. |
GetStringValueFromCborMapByKey(Byte[], Int32)
- Source:
- CborUtils.cs
Reads a CBOR-encoded map and returns the text string value associated with the specified integer key.
public static string GetStringValueFromCborMapByKey(byte[] cborBytes, int key);
static member GetStringValueFromCborMapByKey : byte[] * int -> string
Public Shared Function GetStringValueFromCborMapByKey (cborBytes As Byte(), key As Integer) As String
Parameters
- cborBytes
- Byte[]
The CBOR payload (byte array) whose root element is expected to be a map. Null or empty data returns empty string.
- key
- Int32
The integer map key whose associated text string value should be returned.
Returns
The string value associated with the key if present; otherwise an empty string if the key is absent, the value is not a text string, or the CBOR payload is invalid/not a map.
Applies to
GetStringValueFromCborMapByKey(Byte[], String)
- Source:
- CborUtils.cs
Reads a CBOR-encoded map and returns the text string value associated with the specified key.
public static string GetStringValueFromCborMapByKey(byte[] cborBytes, string key);
static member GetStringValueFromCborMapByKey : byte[] * string -> string
Public Shared Function GetStringValueFromCborMapByKey (cborBytes As Byte(), key As String) As String
Parameters
- cborBytes
- Byte[]
The CBOR payload (byte array) whose root element is expected to be a map. Null or empty data returns empty string.
- key
- String
The map key whose associated text string value should be returned (case-sensitive comparison).
Returns
The string value associated with the key if present; otherwise an empty string if the key is absent, the value is not a text string, or the CBOR payload is invalid/not a map.