#### [Abblix\.Jwt](https://www.abblix.com/en/docs/api/abblix-jwt 'index')
### [Abblix\.Jwt](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt 'Abblix\.Jwt')

## JsonArrayExtensions Class

Conversion helpers between a raw [System\.Text\.Json\.Nodes\.JsonArray](https://learn.microsoft.com/en-us/dotnet/api/system.text.json.nodes.jsonarray 'System\.Text\.Json\.Nodes\.JsonArray') wire form and a sequence of
[AuthorizationDetail](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.AuthorizationDetail 'Abblix\.Jwt\.AuthorizationDetail') wrappers\. Parallels [JsonObjectExtensions](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.JsonObjectExtensions 'Abblix\.Jwt\.JsonObjectExtensions')
for object\-shaped claims; here the shape is a JSON array and each element is a wrapper
over its underlying [System\.Text\.Json\.Nodes\.JsonNode](https://learn.microsoft.com/en-us/dotnet/api/system.text.json.nodes.jsonnode 'System\.Text\.Json\.Nodes\.JsonNode')\.

```csharp
public static class JsonArrayExtensions
```

Inheritance [System\.Object](https://learn.microsoft.com/en-us/dotnet/api/system.object 'System\.Object') → JsonArrayExtensions

### Remarks
The raw [System\.Text\.Json\.Nodes\.JsonArray](https://learn.microsoft.com/en-us/dotnet/api/system.text.json.nodes.jsonarray 'System\.Text\.Json\.Nodes\.JsonArray') remains the source of truth — member order and type\-specific
payload survive the authorize → code → token round\-trip byte\-exact because no typed
deserialise / re\-serialise cycle ever runs over the wrapped nodes\.
### Methods

## JsonArrayExtensions\.ToRawJsonArray\(this IEnumerable\<AuthorizationDetail\>\) Method {#Abblix.Jwt.JsonArrayExtensions.ToRawJsonArray(thisSystem.Collections.Generic.IEnumerable_Abblix.Jwt.AuthorizationDetail_)}

Builds a fresh [System\.Text\.Json\.Nodes\.JsonArray](https://learn.microsoft.com/en-us/dotnet/api/system.text.json.nodes.jsonarray 'System\.Text\.Json\.Nodes\.JsonArray') from a sequence of [AuthorizationDetail](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.AuthorizationDetail 'Abblix\.Jwt\.AuthorizationDetail')
wrappers, deep\-cloning each entry's underlying [Json](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.AuthorizationDetail#Abblix.Jwt.AuthorizationDetail.Json 'Abblix\.Jwt\.AuthorizationDetail\.Json') so
the resulting array is independent of the sources and can attach to a different parent
\(JSON nodes may have only one parent at a time\)\.

```csharp
public static System.Text.Json.Nodes.JsonArray? ToRawJsonArray(this System.Collections.Generic.IEnumerable<Abblix.Jwt.AuthorizationDetail>? details);
```
#### Parameters

###### `details` [System\.Collections\.Generic\.IEnumerable&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1 'System\.Collections\.Generic\.IEnumerable\`1')[AuthorizationDetail](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.AuthorizationDetail 'Abblix\.Jwt\.AuthorizationDetail')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1 'System\.Collections\.Generic\.IEnumerable\`1') {#Abblix.Jwt.JsonArrayExtensions.ToRawJsonArray(thisSystem.Collections.Generic.IEnumerable_Abblix.Jwt.AuthorizationDetail_).details}

The wrapper sequence, or `null`\.

#### Returns
[System\.Text\.Json\.Nodes\.JsonArray](https://learn.microsoft.com/en-us/dotnet/api/system.text.json.nodes.jsonarray 'System\.Text\.Json\.Nodes\.JsonArray')  
A fresh [System\.Text\.Json\.Nodes\.JsonArray](https://learn.microsoft.com/en-us/dotnet/api/system.text.json.nodes.jsonarray 'System\.Text\.Json\.Nodes\.JsonArray'), or `null` when the input is `null`\.

## JsonArrayExtensions\.ToTypedArray\(this JsonArray\) Method {#Abblix.Jwt.JsonArrayExtensions.ToTypedArray(thisSystem.Text.Json.Nodes.JsonArray)}

Wraps each non\-null element of a raw [System\.Text\.Json\.Nodes\.JsonArray](https://learn.microsoft.com/en-us/dotnet/api/system.text.json.nodes.jsonarray 'System\.Text\.Json\.Nodes\.JsonArray') as an
[AuthorizationDetail](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.AuthorizationDetail 'Abblix\.Jwt\.AuthorizationDetail')\. The wrappers share references with the source array's
nodes — read\-through is byte\-exact, and any property\-setter calls mutate the underlying
array in place\.

```csharp
public static Abblix.Jwt.AuthorizationDetail[]? ToTypedArray(this System.Text.Json.Nodes.JsonArray? jsonArray);
```
#### Parameters

###### `jsonArray` [System\.Text\.Json\.Nodes\.JsonArray](https://learn.microsoft.com/en-us/dotnet/api/system.text.json.nodes.jsonarray 'System\.Text\.Json\.Nodes\.JsonArray') {#Abblix.Jwt.JsonArrayExtensions.ToTypedArray(thisSystem.Text.Json.Nodes.JsonArray).jsonArray}

The raw array, or `null`\.

#### Returns
[AuthorizationDetail](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.AuthorizationDetail 'Abblix\.Jwt\.AuthorizationDetail')[\[\]](https://learn.microsoft.com/en-us/dotnet/api/system.array 'System\.Array')  
A wrapper array, or `null` when the input is `null`\.
