-
|
I've been struggling with an issue in a project I've been working on, and not quite getting the mpc tool to generate source that respects the uses that values set in the [MessagePackObject]
public struct Reply
{
[Key("status")]
public readonly string Status;
[Key("response")]
public readonly Dictionary<string, object> Response;
[SerializationConstructor]
public Reply(string status, Dictionary<string, object> response)
{
Status = status;
Response = response;
}
}however, in the generated formatter, the span of bytes produces strings based on the property name and not the value in the specified attribute: I'm invoking the the mpc tool via the command line Is there a way to have the codegen use the values in the key attribute? Thank you all in advance Messagepack version: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
|
Oh, that's a very interesting report, and your analysis seems spot on. |
Beta Was this translation helpful? Give feedback.
Thanks again - I've put up the PR here: #1963