//------------------------------------------------------------------------------ // This code was generated by myriad. // Changes to this file will be lost when the code is regenerated. //------------------------------------------------------------------------------ namespace ConsumePlugin /// Module containing JSON parsing methods for the InnerType type [] [] module InnerType = /// Parse from a JSON node. let jsonParse (node : System.Text.Json.Nodes.JsonNode) : InnerType = let Thing = (match node.[(Literals.something)] with | null -> raise ( System.Collections.Generic.KeyNotFoundException ( sprintf "Required key '%s' not found on JSON object" ((Literals.something)) ) ) | v -> v) .AsValue() .GetValue () { Thing = Thing } namespace ConsumePlugin /// Module containing JSON parsing methods for the JsonRecordType type [] [] module JsonRecordType = /// Parse from a JSON node. let jsonParse (node : System.Text.Json.Nodes.JsonNode) : JsonRecordType = let F = (match node.["f"] with | null -> raise ( System.Collections.Generic.KeyNotFoundException ( sprintf "Required key '%s' not found on JSON object" ("f") ) ) | v -> v) .AsArray () |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> Array.ofSeq let E = (match node.["e"] with | null -> raise ( System.Collections.Generic.KeyNotFoundException ( sprintf "Required key '%s' not found on JSON object" ("e") ) ) | v -> v) .AsArray () |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> Array.ofSeq let D = InnerType.jsonParse node.["d"] let C = (match node.["hi"] with | null -> raise ( System.Collections.Generic.KeyNotFoundException ( sprintf "Required key '%s' not found on JSON object" ("hi") ) ) | v -> v) .AsArray () |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq let B = (match node.["another-thing"] with | null -> raise ( System.Collections.Generic.KeyNotFoundException ( sprintf "Required key '%s' not found on JSON object" ("another-thing") ) ) | v -> v) .AsValue() .GetValue () let A = (match node.["a"] with | null -> raise ( System.Collections.Generic.KeyNotFoundException ( sprintf "Required key '%s' not found on JSON object" ("a") ) ) | v -> v) .AsValue() .GetValue () { A = A B = B C = C D = D E = E F = F }