The HouseValuation type is the root type that is used only to host the Parse and Load methods, but it is not the type that represents the actual parsed document. If you look at the type Load or Parse , you will see something like this:
Load : string -> JsonProvider<"...">.Root
Thus, the type of the actual parsed document is a nested Root type in the main HouseValuation type HouseValuation . Then the function should take HouseValuation.Root as an argument:
type HouseValuation = JsonProvider<" ... "> let createSchoolAssignmentSearchCriteria(houseValuation:HouseValuation.Root) = houseValuation.AddressOne
When entering HouseValuation. you will see two static methods, as well as all nested types (although in this example there is only one record type).
source share