Skip to content

JsonName Method ​

Definition ​

  • Namespace: JASE.Extensions
  • Assembly: JASE.ReflectionTools.dll

string JsonName(PropertyInfo property, bool camelCase = null) ​

csharp
string JsonName(PropertyInfo property, bool camelCase = null)

Resolves the name of a property in the JSON payload based on either Newtonsoft.Json or System.Text.Json attributes, falling back to the property name (optionally camelCased).

Parameters ​

NameDescription
camelCaseWhen true the returned property name will be camelCased (Default: true)
propertyThe property being examined