Skip to content
JuDelCo edited this page May 20, 2021 · 11 revisions

JNode : IDisposable, IEnumerable< JNode >

JNode Parent;
IEnumerable<JNode> Children;
string Path;

void Reset();
void Subscribe(ILinkHandler handle, Action<JNode> action);
int GetSubscriberCount();
void Detach();
JNode Clone();
bool IsDisposed();

bool IsDict();
bool IsList();
bool IsData();
bool IsRef();
JDict AsDict();
JList AsList();
JData<T> AsData<T>();
JRef AsRef();
Type GetDataType();
object GetRawData();
void SetRawData(object rawData);
IEnumerable<JNode> Select(Func<JNode, bool> predicate, int maxDepth = -1);
void Merge(JNode data, bool clearLists = true);

JData<T> AsDataEnum<T>() where T : Enum;
JData<bool> AsDataBool();
JData<byte> AsDataByte();
JData<sbyte> AsDataSByte();
JData<char> AsDataChar();
JData<float> AsDataSingle();
JData<float> AsDataFloat();
JData<double> AsDataDouble();
JData<double> AsDataFloat64();
JData<decimal> AsDataDecimal();
JData<decimal> AsDataFloat128();
JData<short> AsDataShort();
JData<short> AsDataInt16();
JData<int> AsDataInt();
JData<int> AsDataInt32();
JData<long> AsDataLong();
JData<long> AsDataInt64();
JData<ushort> AsDataUShort();
JData<ushort> AsDataUInt16();
JData<uint> AsDataUInt();
JData<uint> AsDataUInt32();
JData<ulong> AsDataULong();
JData<ulong> AsDataUInt64();
JData<string> AsDataString();
JData<DateTime> AsDataDateTime();

JDict : JNode, IDictionary<string, JNode>

JDict();
JDict(bool reseteable, bool subscribeToChildren = true);
JDict(bool reseteable, int capacity, bool subscribeToChildren = true);
bool IsReseteable();
bool IsSubscribingToChildren();
void Add<T>(string key, T value);
void Add<T>(string key, T value, T defaultValue);
void Add(IEnumerable<KeyValuePair<string, JNode>> kvps);
string GetKey(JNode node);
bool ContainsKey(string key);
IJDict AsEnumerableDict();
void Move(string oldKey, string newKey);
void Remove(JNode node);
void Clear(bool triggerOnlyOnce = true);
string ToString();

// Useful when defining your own struct based on JDict
protected T GetDict<T>(string key) where T : JDict, new();
protected JDict GetDict(string key, bool reseteable = false, int capacity = 0, bool subscribeToChildren = true);
protected JDict GetDict(string key, int capacity = 0);
protected JList GetList(string key, bool reseteable = true, int capacity = 0, bool subscribeToChildren = true);
protected JList GetList(string key, int capacity = 0);
protected JData<T> GetData<T>(string key, T defaultValue = default(T));
protected JData<T> GetData<T>(string key, T defaultValue, T value = default(T));
protected JData<string> GetDataString(string key);
protected JData<bool> GetDataBool(string key);
protected JData<byte> GetDataByte(string key);
protected JData<sbyte> GetDataSByte(string key);
protected JData<char> GetDataChar(string key);
protected JData<float> GetDataSingle(string key);
protected JData<float> GetDataFloat(string key);
protected JData<double> GetDataDouble(string key);
protected JData<double> GetDataFloat64(string key);
protected JData<decimal> GetDataDecimal(string key);
protected JData<decimal> GetDataFloat128(string key);
protected JData<short> GetDataShort(string key);
protected JData<short> GetDataInt16(string key);
protected JData<int> GetDataInt(string key);
protected JData<int> GetDataInt32(string key);
protected JData<long> GetDataLong(string key);
protected JData<long> GetDataInt64(string key);
protected JData<ushort> GetDataUShort(string key);
protected JData<ushort> GetDataUInt16(string key);
protected JData<uint> GetDataUInt(string key);
protected JData<uint> GetDataUInt32(string key);
protected JData<ulong> GetDataULong(string key);
protected JData<ulong> GetDataUInt64(string key);

JList

JData

JRef

JNodeHjson

Clone this wiki locally