package com.bytedance.sdk.component.fm;

import android.text.TextUtils;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.json.JSONException;
import org.json.JSONObject;

/* JADX INFO: loaded from: classes.dex */
public final class dsz {
    private final Map<String, Object> fm = new ConcurrentHashMap();

    private dsz() {
    }

    public static dsz fm() {
        return new dsz();
    }

    public String ro() {
        JSONObject jSONObject = new JSONObject();
        try {
            for (Map.Entry<String, Object> entry : this.fm.entrySet()) {
                jSONObject.put(entry.getKey(), entry.getValue());
            }
            return jSONObject.toString();
        } catch (JSONException unused) {
            return "";
        }
    }

    public dsz fm(String str, Object obj) {
        if (!TextUtils.isEmpty(str) && obj != null) {
            this.fm.put(str, obj);
        }
        return this;
    }
}
