From eaf9a0342d69b4cbbfb3644ce42e196453ce164a Mon Sep 17 00:00:00 2001 From: yixingz3 <88013471+yixingz3@users.noreply.github.com> Date: Sun, 28 Nov 2021 12:33:22 -0500 Subject: [PATCH] feat: added UPPER_CASE_WITH_UNDERSCORES in FieldNamingPolicy (#2024) --- .../com/google/gson/FieldNamingPolicy.java | 28 +++++++++++++++---- .../google/gson/FieldNamingPolicyTest.java | 3 +- .../gson/functional/FieldNamingTest.java | 9 ++++++ .../gson/functional/NamingPolicyTest.java | 16 +++++++++++ 4 files changed, 50 insertions(+), 6 deletions(-) diff --git a/gson/src/main/java/com/google/gson/FieldNamingPolicy.java b/gson/src/main/java/com/google/gson/FieldNamingPolicy.java index 16e7124f..a4fa7c27 100644 --- a/gson/src/main/java/com/google/gson/FieldNamingPolicy.java +++ b/gson/src/main/java/com/google/gson/FieldNamingPolicy.java @@ -44,7 +44,7 @@ public enum FieldNamingPolicy implements FieldNamingStrategy { * Using this naming policy with Gson will ensure that the first "letter" of the Java * field name is capitalized when serialized to its JSON form. * - *

Here's a few examples of the form "Java Field Name" ---> "JSON Field Name":

+ *

Here are a few examples of the form "Java Field Name" ---> "JSON Field Name":

*