public static String snakeToCamel(String name) {
        if (name == null || name.indexOf('_') == -1) {
            return name;
        }

        int underscoreCount = 0;
        for (int i = 0; i < name.length(); i++) {
            char ch = name.charAt(i);
            if (ch == '_') {
                underscoreCount++;
            }
        }

        char[] chars = new char[name.length() - underscoreCount];
        for (int i = 0, j = 0; i < name.length(); i++) {
            char ch = name.charAt(i);
            if (ch == '_') {
                continue;
            }
            if (i > 0 && name.charAt(i - 1) == '_') {
                if (ch >= 'a' && ch <= 'z') {
                    ch -= 32;
                }
            }
            chars[j++] = ch;
        }

        return new String(chars);
    }
Using this naming policy with FASTJSON will modify the Java Field name from its camel cased form to a lower case field name where each word is separated by a dot (.).
Here are a few examples of the form "Java Field Name" ---&gt; "JSON Field Name":
someFieldName ---&gt; some.field.name
_someFieldName ---&gt; _some.field.name
aStringField ---&gt; a.string.field
aURL ---&gt; a.u.r.l
Using dots in JavaScript is not recommended since dot is also used for a member sign in expressions. This requires that a field named with dots is always accessed as a quoted property like myobject['my.field']. Accessing it as an object field myobject.my.field will result in an unintended javascript expression.
@since 2.0.7
core/src/main/java/com/alibaba/fastjson2/PropertyNamingStrategy.java