Add JSON parse source gen (#9)

This commit is contained in:
Patrick Stevens
2023-12-27 11:46:12 +00:00
committed by GitHub
parent 055aad8c5e
commit 39d603c317
22 changed files with 882 additions and 145 deletions

View File

@@ -0,0 +1,28 @@
namespace ConsumePlugin
open System.Text.Json.Serialization
module Literals =
[<Literal>]
let something = "something"
[<MyriadPlugin.JsonParse>]
type InnerType =
{
[<JsonPropertyName(Literals.something)>]
Thing : string
}
/// My whatnot
[<MyriadPlugin.JsonParse>]
type JsonRecordType =
{
/// A thing!
A : int
/// Another thing!
[<JsonPropertyName "another-thing">]
B : string
[<System.Text.Json.Serialization.JsonPropertyName "hi">]
C : int list
D : InnerType
}