ChrisCompleteCodeTrunk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
using Newtonsoft.Json.Utilities;
namespace Newtonsoft.Json.Serialization
{
/// <summary>
/// A camel case naming strategy.
/// </summary>
public class CamelCaseNamingStrategy : NamingStrategy
{
/// <summary>
/// Initializes a new instance of the <see cref="CamelCaseNamingStrategy"/> class.
/// </summary>
/// <param name="processDictionaryKeys">
/// A flag indicating whether dictionary keys should be processed.
/// </param>
/// <param name="overrideSpecifiedNames">
/// A flag indicating whether explicitly specified property names should be processed,
/// e.g. a property name customized with a <see cref="JsonPropertyAttribute"/>.
/// </param>
public CamelCaseNamingStrategy(bool processDictionaryKeys, bool overrideSpecifiedNames)
{
ProcessDictionaryKeys = processDictionaryKeys;
OverrideSpecifiedNames = overrideSpecifiedNames;
}
/// <summary>
/// Initializes a new instance of the <see cref="CamelCaseNamingStrategy"/> class.
/// </summary>
public CamelCaseNamingStrategy()
{
}
/// <summary>
/// Resolves the specified property name.
/// </summary>
/// <param name="name">The property name to resolve.</param>
/// <returns>The resolved property name.</returns>
protected override string ResolvePropertyName(string name)
{
return StringUtils.ToCamelCase(name);
}
}
}
|
Revision |
Author |
Commited |
Message |
1
|
BBDSCHRIS
|
Wed 22 Aug, 2018 20:08:03 +0000 |
|