mirror of
https://github.com/Smaug123/WoofWare.Myriad
synced 2025-10-06 04:28:42 +00:00
Enforce non-nullability in more cases during JSON parse (#367)
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -71,7 +71,11 @@ module JsonRecordType =
|
||||
)
|
||||
| v -> v)
|
||||
.AsArray ()
|
||||
|> Seq.map (fun elt -> elt.AsValue().GetValue<System.Int32> ())
|
||||
|> Seq.map (fun elt ->
|
||||
(match elt with
|
||||
| null -> raise (System.ArgumentNullException ())
|
||||
| elt -> elt.AsValue().GetValue<System.Int32> ())
|
||||
)
|
||||
|> Array.ofSeq
|
||||
|
||||
let arg_4 =
|
||||
@@ -84,7 +88,11 @@ module JsonRecordType =
|
||||
)
|
||||
| v -> v)
|
||||
.AsArray ()
|
||||
|> Seq.map (fun elt -> elt.AsValue().GetValue<System.String> ())
|
||||
|> Seq.map (fun elt ->
|
||||
(match elt with
|
||||
| null -> raise (System.ArgumentNullException ())
|
||||
| elt -> elt.AsValue().GetValue<System.String> ())
|
||||
)
|
||||
|> Array.ofSeq
|
||||
|
||||
let arg_3 =
|
||||
@@ -109,7 +117,11 @@ module JsonRecordType =
|
||||
)
|
||||
| v -> v)
|
||||
.AsArray ()
|
||||
|> Seq.map (fun elt -> elt.AsValue().GetValue<System.Int32> ())
|
||||
|> Seq.map (fun elt ->
|
||||
(match elt with
|
||||
| null -> raise (System.ArgumentNullException ())
|
||||
| elt -> elt.AsValue().GetValue<System.Int32> ())
|
||||
)
|
||||
|> List.ofSeq
|
||||
|
||||
let arg_1 =
|
||||
|
@@ -60,7 +60,11 @@ module GymOpeningHours =
|
||||
)
|
||||
| v -> v)
|
||||
.AsArray ()
|
||||
|> Seq.map (fun elt -> elt.AsValue().GetValue<System.String> ())
|
||||
|> Seq.map (fun elt ->
|
||||
(match elt with
|
||||
| null -> raise (System.ArgumentNullException ())
|
||||
| elt -> elt.AsValue().GetValue<System.String> ())
|
||||
)
|
||||
|> List.ofSeq
|
||||
|
||||
let arg_0 =
|
||||
@@ -1038,7 +1042,11 @@ module Sessions =
|
||||
)
|
||||
| v -> v)
|
||||
.AsArray ()
|
||||
|> Seq.map (fun elt -> Visit.jsonParse elt)
|
||||
|> Seq.map (fun elt ->
|
||||
(match elt with
|
||||
| null -> raise (System.ArgumentNullException ())
|
||||
| elt -> Visit.jsonParse elt)
|
||||
)
|
||||
|> List.ofSeq
|
||||
|
||||
let arg_0 =
|
||||
|
@@ -48,7 +48,14 @@ module PureGymApi =
|
||||
System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct)
|
||||
|> Async.AwaitTask
|
||||
|
||||
return jsonNode.AsArray () |> Seq.map (fun elt -> Gym.jsonParse elt) |> List.ofSeq
|
||||
return
|
||||
jsonNode.AsArray ()
|
||||
|> Seq.map (fun elt ->
|
||||
(match elt with
|
||||
| null -> raise (System.ArgumentNullException ())
|
||||
| elt -> Gym.jsonParse elt)
|
||||
)
|
||||
|> List.ofSeq
|
||||
}
|
||||
|> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct))
|
||||
|
||||
|
@@ -408,7 +408,11 @@ module InnerTypeWithBothJsonParseExtension =
|
||||
|
||||
let value =
|
||||
(kvp.Value).AsArray ()
|
||||
|> Seq.map (fun elt -> elt.AsValue().GetValue<System.Char> ())
|
||||
|> Seq.map (fun elt ->
|
||||
(match elt with
|
||||
| null -> raise (System.ArgumentNullException ())
|
||||
| elt -> elt.AsValue().GetValue<System.Char> ())
|
||||
)
|
||||
|> List.ofSeq
|
||||
|
||||
key, value
|
||||
@@ -676,7 +680,11 @@ module JsonRecordTypeWithBothJsonParseExtension =
|
||||
)
|
||||
| v -> v)
|
||||
.AsArray ()
|
||||
|> Seq.map (fun elt -> elt.AsValue().GetValue<System.Int32> ())
|
||||
|> Seq.map (fun elt ->
|
||||
(match elt with
|
||||
| null -> raise (System.ArgumentNullException ())
|
||||
| elt -> elt.AsValue().GetValue<System.Int32> ())
|
||||
)
|
||||
|> Array.ofSeq
|
||||
|
||||
let arg_4 =
|
||||
@@ -689,7 +697,11 @@ module JsonRecordTypeWithBothJsonParseExtension =
|
||||
)
|
||||
| v -> v)
|
||||
.AsArray ()
|
||||
|> Seq.map (fun elt -> elt.AsValue().GetValue<System.String> ())
|
||||
|> Seq.map (fun elt ->
|
||||
(match elt with
|
||||
| null -> raise (System.ArgumentNullException ())
|
||||
| elt -> elt.AsValue().GetValue<System.String> ())
|
||||
)
|
||||
|> Array.ofSeq
|
||||
|
||||
let arg_3 =
|
||||
@@ -714,7 +726,11 @@ module JsonRecordTypeWithBothJsonParseExtension =
|
||||
)
|
||||
| v -> v)
|
||||
.AsArray ()
|
||||
|> Seq.map (fun elt -> elt.AsValue().GetValue<System.Int32> ())
|
||||
|> Seq.map (fun elt ->
|
||||
(match elt with
|
||||
| null -> raise (System.ArgumentNullException ())
|
||||
| elt -> elt.AsValue().GetValue<System.Int32> ())
|
||||
)
|
||||
|> List.ofSeq
|
||||
|
||||
let arg_1 =
|
||||
|
@@ -94,7 +94,11 @@ module JwtVaultAuthResponse =
|
||||
)
|
||||
| v -> v)
|
||||
.AsArray ()
|
||||
|> Seq.map (fun elt -> elt.AsValue().GetValue<System.String> ())
|
||||
|> Seq.map (fun elt ->
|
||||
(match elt with
|
||||
| null -> raise (System.ArgumentNullException ())
|
||||
| elt -> elt.AsValue().GetValue<System.String> ())
|
||||
)
|
||||
|> List.ofSeq
|
||||
|
||||
let arg_3 =
|
||||
@@ -107,7 +111,11 @@ module JwtVaultAuthResponse =
|
||||
)
|
||||
| v -> v)
|
||||
.AsArray ()
|
||||
|> Seq.map (fun elt -> elt.AsValue().GetValue<System.String> ())
|
||||
|> Seq.map (fun elt ->
|
||||
(match elt with
|
||||
| null -> raise (System.ArgumentNullException ())
|
||||
| elt -> elt.AsValue().GetValue<System.String> ())
|
||||
)
|
||||
|> List.ofSeq
|
||||
|
||||
let arg_2 =
|
||||
@@ -120,7 +128,11 @@ module JwtVaultAuthResponse =
|
||||
)
|
||||
| v -> v)
|
||||
.AsArray ()
|
||||
|> Seq.map (fun elt -> elt.AsValue().GetValue<System.String> ())
|
||||
|> Seq.map (fun elt ->
|
||||
(match elt with
|
||||
| null -> raise (System.ArgumentNullException ())
|
||||
| elt -> elt.AsValue().GetValue<System.String> ())
|
||||
)
|
||||
|> List.ofSeq
|
||||
|
||||
let arg_1 =
|
||||
|
Reference in New Issue
Block a user