public static void SetEnum(this Dictionary <string, IJsonNode> jsonNode, string key, Enum value, bool toString = false) { if (toString) { jsonNode[key] = new MyJson_String(value); } else { jsonNode[key] = new MyJson_Number(value); } }
//-----------------------------基础部分---------------------------------- public static void SetBool(this Dictionary <string, IJsonNode> jsonNode, string key, bool value) { jsonNode[key] = new MyJson_Number(value); }
public static void SetNumber(this Dictionary <string, IJsonNode> jsonNode, string key, double value, int?digits = null) { jsonNode[key] = new MyJson_Number(Math.Round(value, digits ?? ExportToolsSetting.instance.floatRoundDigits)); }
public static void SetUnityID(this Dictionary <string, IJsonNode> jsonNode, int value) { jsonNode["unityId"] = new MyJson_Number(value); }