Table of Contents

Class JsonNamingPolicy

Namespace
Nerdbank.Json
Assembly
Nerdbank.Json.dll

Defines a transformation for property names from .NET to JSON.

public abstract class JsonNamingPolicy
Inheritance
JsonNamingPolicy
Inherited Members

Properties

CamelCase

Gets a naming policy that converts identifiers to camelCase.

public static JsonNamingPolicy CamelCase { get; }

Property Value

JsonNamingPolicy

KebabLowerCase

Gets a naming policy that converts identifiers to lower-case kebab-case.

public static JsonNamingPolicy KebabLowerCase { get; }

Property Value

JsonNamingPolicy

KebabUpperCase

Gets a naming policy that converts identifiers to upper-case kebab-case.

public static JsonNamingPolicy KebabUpperCase { get; }

Property Value

JsonNamingPolicy

PascalCase

Gets a naming policy that converts identifiers to PascalCase.

public static JsonNamingPolicy PascalCase { get; }

Property Value

JsonNamingPolicy

SnakeLowerCase

Gets a naming policy that converts identifiers to snake_case.

public static JsonNamingPolicy SnakeLowerCase { get; }

Property Value

JsonNamingPolicy

SnakeUpperCase

Gets a naming policy that converts identifiers to SNAKE_CASE.

public static JsonNamingPolicy SnakeUpperCase { get; }

Property Value

JsonNamingPolicy

Methods

ConvertName(string)

Transforms a .NET property name to the serialized JSON property name.

public abstract string ConvertName(string name)

Parameters

name string

The .NET property name.

Returns

string

The JSON property name.