Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

JSONObject.toJavaObject方法的参数没有使用 #4540

Open
jackson-91 opened this issue Oct 19, 2024 · 0 comments
Open

JSONObject.toJavaObject方法的参数没有使用 #4540

jackson-91 opened this issue Oct 19, 2024 · 0 comments

Comments

@jackson-91
Copy link

fastjson 2.0.31 版本:

JSONObject类中有一个toJavaObject方法,但是第三个参数feature没有使用,请问以后会使用 feature 参数来为 JsonObject 转化到 JavaObject 提供支持吗?(比如:使用 Feature.DisableFieldSmartMatch 来关闭将下划线( "_" )转为 驼峰模式)

    public <T> T toJavaObject(Class<T> clazz, ParserConfig config, int features) {
        if (clazz == Map.class) {
            return (T) this;
        }

        if (clazz == Object.class && !containsKey(JSON.DEFAULT_TYPE_KEY)) {
            return (T) this;
        }

        return TypeUtils.castToJavaBean(this, clazz, config);
    }
@jackson-91 jackson-91 changed the title JSONObject.toJavaObject JSONObject.toJavaObject方法的参数没有使用 Oct 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant