For example, why is it needed on below code, how can it further be being used?
public class FileAttachment
{
[JsonProperty("fileName")]
public string FileName{ get; set; }
}
For example, why is it needed on below code, how can it further be being used?
public class FileAttachment
{
[JsonProperty("fileName")]
public string FileName{ get; set; }
}
Per the documentation: this is the json key that will be used when serializing/deserializing this object to/from a json string.
So, if the value of FileName
is file.txt
, the serialized result would be
{
"fileName": "file.txt"
}