Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

JsonNamingPolicy Class

Definition

Namespace:
System.Text.Json
Assembly:
System.Text.Json.dll
Package:
System.Text.Json v11.0.0-preview.5.26302.115
Source:
JsonNamingPolicy.cs
Source:
JsonNamingPolicy.cs
Source:
JsonNamingPolicy.cs
Source:
JsonNamingPolicy.cs
Source:
JsonNamingPolicy.cs
Source:
JsonNamingPolicy.cs
Source:
JsonNamingPolicy.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Determines the naming policy used to convert a string-based name to another format, such as a camel-casing format.

public ref class JsonNamingPolicy abstract
public abstract class JsonNamingPolicy
type JsonNamingPolicy = class
Public MustInherit Class JsonNamingPolicy
Inheritance
JsonNamingPolicy

Remarks

For more information, see How to customize property names and values with System.Text.Json.

Constructors

Name Description
JsonNamingPolicy()

Initializes a new instance of JsonNamingPolicy.

Properties

Name Description
CamelCase

Gets the naming policy for camel-casing.

KebabCaseLower

Gets the naming policy for lowercase kebab-casing.

KebabCaseUpper

Gets the naming policy for uppercase kebab-casing.

PascalCase
SnakeCaseLower

Gets the naming policy for lowercase snake-casing.

SnakeCaseUpper

Gets the naming policy for uppercase snake-casing.

Methods

Name Description
ConvertName(String)

When overridden in a derived class, converts the specified name according to the policy.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to


Feedback

Was this page helpful?