diff --git a/DTLib.Ben.Demystifier b/DTLib.Ben.Demystifier
index cfd755c..59de4ea 160000
--- a/DTLib.Ben.Demystifier
+++ b/DTLib.Ben.Demystifier
@@ -1 +1 @@
-Subproject commit cfd755cd8cde6a087ce9a4e4de8302edf771f76a
+Subproject commit 59de4eada9235dd50c1cb0021d0cb8bdcabdc611
diff --git a/DTLib.Dtsod/DTLib.Dtsod.csproj b/DTLib.Dtsod/DTLib.Dtsod.csproj
deleted file mode 100644
index 807fc85..0000000
--- a/DTLib.Dtsod/DTLib.Dtsod.csproj
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
- DTLib.Dtsod
- 1.3.4
- Timerix
- Definitely not json
- GIT
- https://github.com/Timerix22/DTLib
- https://github.com/Timerix22/DTLib
- Release
- MIT
-
- netstandard2.0;net6.0;net7.0;net8.0
- embedded
-
- 11
- disable
- disable
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/DTLib.Dtsod/DtsodV21.cs b/DTLib.Dtsod/DtsodV21.cs
deleted file mode 100644
index 569293c..0000000
--- a/DTLib.Dtsod/DtsodV21.cs
+++ /dev/null
@@ -1,328 +0,0 @@
-namespace DTLib.Dtsod;
-
-// v21
-// парсер теперь не может игнорировать комменты, потом починю
-// теперь числовые значения конвертируются в правильный тип, а не в int64/uint64 (новый вариант switch из c#9.0 делал какую-то дичь)
-// исправлены некоторые другие баги
-
-public class DtsodV21 : Dictionary, IDtsod
-{
- public DtsodVersion Version { get; } = DtsodVersion.V21;
-
- public IDictionary ToDictionary() => this;
-
- readonly string Text;
-
- //public Dictionary Values { get; set; }
- public DtsodV21(string text)
- {
- Text = text;
- foreach (KeyValuePair pair in Parse(text))
- Add(pair.Key, pair.Value);
- }
- public DtsodV21(IDictionary rawDict)
- {
- Text = "";
- foreach (KeyValuePair pair in rawDict)
- Add(pair.Key, pair.Value);
- }
-
-
- // выдаёт Exception
- public new dynamic this[string key]
- {
- get => TryGetValue(key, out dynamic value) ? value : throw new Exception($"Dtsod[{key}] key not found");
- set
- {
- if (!TrySetValue(key, value)) throw new Exception($"Dtsod[{key}] key not found");
- }
- }
-
- // не выдаёт KeyNotFoundException
- public new bool TryGetValue(string key, out dynamic value)
- {
- try
- {
- value = base[key];
- return true;
- }
- catch (KeyNotFoundException)
- {
- value = null;
- return false;
- }
- }
- public bool TrySetValue(string key, dynamic value)
- {
- try
- {
- base[key] = value;
- return true;
- }
- catch (KeyNotFoundException)
- {
- return false;
- }
- }
-
- public override string ToString() => Text;
-
- enum ValueType
- {
- List,
- Complex,
- String,
- Default
- }
-
- Dictionary Parse(string text)
- {
- Dictionary parsed = new();
- int i = 0;
- for (; i < text.Length; i++)
- ReadName();
- return parsed;
-
- // СЛОМАНО
- /*void ReadCommentLine()
- {
- for (; i < text.Length && text[i] != '\n'; i++) DebugNoTime("h", text[i].ToString());
- }*/
-
- void ReadName()
- {
-
- bool isListElem = false;
- dynamic value;
- StringBuilder defaultNameBuilder = new();
-
- for (; i < text.Length; i++)
- {
- switch (text[i])
- {
- case ' ':
- case '\t':
- case '\r':
- case '\n':
- break;
- case ':':
- i++;
- string name = defaultNameBuilder.ToString();
- value = ReadValue();
- // если value это null, эта строка выдавала ошибку
- //DebugNoTime("c", $"parsed.Add({name}, {value} { value.GetType() })");
- if (isListElem)
- {
- if (!parsed.ContainsKey(name))
- parsed.Add(name, new List());
- parsed[name].Add(value);
- }
- else
- parsed.Add(name, value);
- return;
- // строка, начинающаяся с # будет считаться комментом
- case '#':
- //ReadCommentLine();
- break;
- case '}':
- throw new Exception("Parse.ReadName() error: unexpected '}' at " + i + " char");
- // если $ перед названием параметра поставить, значение value добавится в лист с названием name
- case '$':
- if (defaultNameBuilder.ToString().Length != 0)
- throw new Exception("Parse.ReadName() error: unexpected '$' at " + i + " char");
- isListElem = true;
- break;
- case ';':
- throw new Exception("Parse.ReadName() error: unexpected ';' at " + i + " char");
- default:
- defaultNameBuilder.Append(text[i]);
- break;
- }
- }
- }
-
- dynamic ReadValue()
- {
- ValueType type = ValueType.Default;
- dynamic value = null;
-
- string ReadString()
- {
- i++;
- StringBuilder valueBuilder = new();
- valueBuilder.Append('"');
- for (; text[i] != '"' || text[i - 1] == '\\'; i++)
- {
- valueBuilder.Append(text[i]);
- }
- valueBuilder.Append('"');
- type = ValueType.String;
- return valueBuilder.ToString();
- }
-
- List ReadList()
- {
- i++;
- List output = new();
- StringBuilder valueBuilder = new();
- for (; text[i] != ']'; i++)
- {
- switch (text[i])
- {
- case ' ':
- case '\t':
- case '\r':
- case '\n':
- break;
- case ',':
- ParseValueToRightType(valueBuilder.ToString());
- output.Add(value);
- valueBuilder.Clear();
- break;
- default:
- valueBuilder.Append(text[i]);
- break;
- }
- }
- if (valueBuilder.Length > 0)
- {
- ParseValueToRightType(valueBuilder.ToString());
- output.Add(value);
- }
- type = ValueType.List;
- return output;
- }
-
- Dictionary ReadComplex()
- {
- StringBuilder valueBuilder = new();
- int balance = 1;
- i++;
- for (; balance != 0; i++)
- {
- switch (text[i])
- {
- case '"':
- valueBuilder.Append(ReadString());
- break;
- case '}':
- balance--;
- if (balance != 0)
- valueBuilder.Append(text[i]);
- break;
- case '{':
- balance++;
- valueBuilder.Append(text[i]);
- break;
- default:
- valueBuilder.Append(text[i]);
- break;
- }
- }
- i--; // i++ в for выполняется даже когда balance == 0, то есть text[i] получается == ;, что ломает всё
- type = ValueType.Complex;
- return Parse(valueBuilder.ToString());
- }
-
- void ParseValueToRightType(string stringValue)
- {
-
- switch (stringValue)
- {
-
- // bool
- case "true":
- case "false":
- value = stringValue.ToBool();
- break;
- // null
- case "null":
- value = null;
- break;
- default:
- if (stringValue.Contains('"'))
- value = stringValue.Remove(stringValue.Length - 1).Remove(0, 1);
- // double
- else if (stringValue.Contains('.'))
- value = stringValue.ToDouble();
- // ushort; ulong; uint
- else if (stringValue.Length > 2 && stringValue[stringValue.Length - 2] == 'u')
- {
- switch (stringValue[stringValue.Length - 1])
- {
- case 's':
- value = stringValue.Remove(stringValue.Length - 2).ToUShort();
- break;
- case 'i':
- value = stringValue.Remove(stringValue.Length - 2).ToUInt();
- break;
- case 'l':
- value = stringValue.Remove(stringValue.Length - 2).ToULong();
- break;
- default:
- throw new Exception($"Dtsod.Parse.ReadValue() error: value= wrong type ");
- }
- }
- // short; long; int
- else
- switch (stringValue[stringValue.Length - 1])
- {
- case 's':
- value = stringValue.Remove(stringValue.Length - 1).ToShort();
- break;
- case 'l':
- value = stringValue.Remove(stringValue.Length - 1).ToLong();
- break;
- default:
- value = stringValue.ToInt();
- break;
- }
- break;
- }
- }
-
- StringBuilder defaultValueBuilder = new();
- for (; i < text.Length; i++)
- {
- switch (text[i])
- {
- case ' ':
- case '\t':
- case '\r':
- case '\n':
- break;
- case '"':
- value = ReadString();
- break;
- case ';':
- switch (type)
- {
- case ValueType.String:
- ParseValueToRightType(value);
- break;
- case ValueType.Default:
- ParseValueToRightType(defaultValueBuilder.ToString());
- break;
- }
-
- return value;
- case '[':
- value = ReadList();
- break;
- case '{':
- value = ReadComplex();
- break;
- // строка, начинающаяся с # будет считаться комментом
- case '#':
- //ReadCommentLine();
- break;
- default:
- defaultValueBuilder.Append(text[i]);
- break;
- }
- }
- throw new Exception("Dtsod.Parse.ReadValue error: wtf it's the end of function");
- }
- }
-}
-
diff --git a/DTLib.Dtsod/Experimental/ClassSerializer/DtsodAttributes.cs b/DTLib.Dtsod/Experimental/ClassSerializer/DtsodAttributes.cs
deleted file mode 100644
index f71d9f4..0000000
--- a/DTLib.Dtsod/Experimental/ClassSerializer/DtsodAttributes.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-namespace DTLib.Dtsod.ClassSerializer;
-
-[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface)]
-public class DtsodSerializableAttribute : Attribute
-{
- public DtsodVersion Version;
- public DtsodSerializableAttribute(DtsodVersion ver) => Version = ver;
-}
-
-
-[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
-public class SerializeAsAttribute: Attribute
-{
- public string Key;
- ///
- /// use it only for base types
- ///
- /// name the field will be serialized as
- public SerializeAsAttribute(string key) => Key = key;
-}
-
-[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
-public class SerializationMethodAttribute : Attribute
-{
- public Func Method;
- ///
- ///
- /// how to serialize field
- public SerializationMethodAttribute(Func method) => Method = method;
-}
-[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
-public class DeserializationMethodAttribute : Attribute
-{
- public Func Method;
- ///
- ///
- /// how to deserialize field
- public DeserializationMethodAttribute( Func method) => Method = method;
-}
\ No newline at end of file
diff --git a/DTLib.Dtsod/Experimental/V30/DtsodV30.cs b/DTLib.Dtsod/Experimental/V30/DtsodV30.cs
deleted file mode 100644
index 766ab76..0000000
--- a/DTLib.Dtsod/Experimental/V30/DtsodV30.cs
+++ /dev/null
@@ -1,298 +0,0 @@
-using System.Globalization;
-using DTLib.Dtsod.ClassSerializer;
-
-namespace DTLib.Dtsod;
-
-public class DtsodV30 : DtsodDict, IDtsod
-{
- public DtsodVersion Version { get; } = DtsodVersion.V30;
-
- public IDictionary ToDictionary() => this;
-
- public DtsodV30() : base() => UpdateLazy();
- public DtsodV30(IDictionary dict) : base(dict) => UpdateLazy();
- public DtsodV30(string serialized) : this() => Append(Deserialize(serialized));
-
- static IDictionary Deserialize(string text)
- {
- char c;
- int i = -1; // ++i в ReadType
- StringBuilder b = new();
-
-
- Type ReadType()
- {
-
- while (i < text.Length - 1)
- {
- c = text[++i];
- switch (c)
- {
- case ' ':
- case '\t':
- case '\r':
- case '\n':
- break;
- case '#':
- SkipComment();
- break;
- case ':':
- string _type = b.ToString();
- b.Clear();
- return TypeHelper.Instance.TypeFromString(_type);
- case '=':
- case '"':
- case '\'':
- case ';':
- case '[':
- case ']':
- case '{':
- case '}':
- throw new Exception($"DtsodV30.Deserialize() error: unexpected {c}");
- default:
- b.Append(c);
- break;
- }
- }
-
- throw new Exception("DtsodV30.Deserialize.ReadType() error: end of text\ntext:\n" + text);
- }
-
- string ReadName()
- {
- while (i < text.Length - 1)
- {
- c = text[++i];
- switch (c)
- {
- case ' ':
- case '\t':
- case '\r':
- case '\n':
- break;
- case '#':
- SkipComment();
- break;
- case '=':
- string _name = b.ToString();
- b.Clear();
- return _name;
- case ':':
- case '"':
- case '\'':
- case ';':
- case '[':
- case ']':
- case '{':
- case '}':
- throw new Exception($"DtsodV30.Deserialize() error: unexpected {c}");
- default:
- b.Append(c);
- break;
- }
- }
-
- throw new Exception("DtsodV30.Deserialize.ReadName() error: end of text\ntext:\n" + text);
- }
-
- object ReadValue(ref bool endoflist)
- {
- void ReadString()
- {
- c = text[++i]; //пропускает начальный символ '"'
- while ((c != '"' && c != '\'') || (text[i - 1] == '\\' && text[i - 2] != '\\'))
- {
- b.Append(c);
- if (++i >= text.Length) throw new Exception("DtsodV30.Deserialize() error: end of text\ntext:\n" + text);
- c = text[i];
- }
- }
-
- List