我们是否有像Golang中的json注释一样的东西?
由于下划线的存在,LongName总是为null,而我不想在我的类属性中使用下划线。在反序列化时是否有忽略下划线的选项?
type FieldType struct {
TypeName string `json:"typeName"`
CodeType string `json:"codeType"`
Suffix string `json:"suffix"`
PropertiesRaw json.RawMessage `json:"properties"`
Properties FieldTypePropertyMap
}
我有一个 JSON 字符串:
{ "long_name":"dffdf" }
我的类:
public class Result
{
public int LongName {get; set;}
}
由于下划线的存在,LongName总是为null,而我不想在我的类属性中使用下划线。在反序列化时是否有忽略下划线的选项?
SnakeCaseNamingStrategy
。 - dbc