Table of Contents

DefaultOrConvertName Method

Definition

Namespace
Cuemon.Extensions.Text.Json
Assemblies
Cuemon.Extensions.Text.Json.dll
Source
src/Cuemon.Extensions.Text.Json/JsonNamingPolicyExtensions.cs

DefaultOrConvertName(JsonNamingPolicy, string)

Returns the specified name following the JsonNamingPolicy.

public static string DefaultOrConvertName(this JsonNamingPolicy policy, string name)

Parameters

policy JsonNamingPolicy

The policy to apply.

name string

The name to apply to a JSON property.

Returns

string

When policy is null, the specified name is returned unaltered; otherwise it is converted according to the JsonNamingPolicy.