Support units of measure in JsonParse (#170)

This commit is contained in:
Patrick Stevens
2024-06-24 23:23:23 +01:00
committed by GitHub
parent db4694f6e7
commit 85929d49d5
10 changed files with 124 additions and 50 deletions

View File

@@ -148,6 +148,7 @@ module GymLocation =
reraise ()
else
reraise ()
|> LanguagePrimitives.FloatWithMeasure
let arg_0 =
try

View File

@@ -19,13 +19,16 @@ type GymAccessOptions =
QrCodeAccess : bool
}
[<Measure>]
type measure
[<WoofWare.Myriad.Plugins.JsonParse>]
type GymLocation =
{
[<JsonNumberHandling(JsonNumberHandling.AllowReadingFromString)>]
Longitude : float
[<JsonNumberHandling(JsonNumberHandling.AllowReadingFromString)>]
Latitude : float
Latitude : float<measure>
}
[<WoofWare.Myriad.Plugins.JsonParse>]