mirror of
https://github.com/Smaug123/WoofWare.Myriad
synced 2025-10-11 06:58:42 +00:00
Allow serde of guids (#82)
This commit is contained in:
@@ -21,7 +21,7 @@ module InnerTypeWithBothJsonSerializeExtension =
|
||||
let node = System.Text.Json.Nodes.JsonObject ()
|
||||
|
||||
do
|
||||
node.Add (("it's-a-me"), System.Text.Json.Nodes.JsonValue.Create<string> input.Thing)
|
||||
node.Add (("it's-a-me"), System.Text.Json.Nodes.JsonValue.Create<Guid> input.Thing)
|
||||
|
||||
node.Add (
|
||||
"map",
|
||||
@@ -245,6 +245,7 @@ module InnerTypeWithBothJsonParseExtension =
|
||||
| v -> v)
|
||||
.AsValue()
|
||||
.GetValue<string> ()
|
||||
|> System.Guid.Parse
|
||||
|
||||
{
|
||||
Thing = Thing
|
||||
|
@@ -9,7 +9,7 @@ open System.Text.Json.Serialization
|
||||
type InnerTypeWithBoth =
|
||||
{
|
||||
[<JsonPropertyName("it's-a-me")>]
|
||||
Thing : string
|
||||
Thing : Guid
|
||||
Map : Map<string, Uri>
|
||||
ReadOnlyDict : IReadOnlyDictionary<string, char list>
|
||||
Dict : IDictionary<Uri, bool>
|
||||
|
Reference in New Issue
Block a user