How can I get the value of a key without resorting to the key lookup method?
array elements, as well as for copying the array to the specified element.
The codebase is still being updated. that's why I'm publishing a copy of 1.06 here.
example of new functions
Print("JASon Example Array access:"); js["DirAccess"][0]=-1; // direct reference to the element at index 0, which has not existed yet. The element is created immediately js["DirAccess"][1]=22; string a[] = {"test", "add", "to array"}; for (int i=0; i<3; ++i) js["ArrayAdd"].Add(a[i]); // adding an element to the array CJAson* js_ar=js["ArrayCopy"]; js_ar.Set(js["DirAccess"].m_e); // pay attention to the brackets around 'ArrayCopy'. Он создается новый, и для корректной работы с указателем он должен создасться до обращения к его функции Set
Question from a "dummy".
How can I get the value of a key without resorting to the key lookup method?
The codebase is still being updated. that's why I'm publishing a copy of 1.06 here.
example of new functions
js["DirAccess"][0]=-1; // direct reference to the element at index 0, which has not existed yet. The element is created immediately
js["DirAccess"][1]=22;
string a[] = {"test", "add", "to array"};
for (int i=0; i<3; ++i) js["ArrayAdd"].Add(a[i]); // adding an element to the array
CJAson* js_ar=js["ArrayCopy"]; js_ar.Set(js["DirAccess"].m_e); // pay attention to the brackets around 'ArrayCopy'. Он создается новый, и для корректной работы с указателем он должен создасться до обращения к его функции Set
Hello!
Jason.mqh stopped compiling on the latest build 1495.
I suspect it's because of point 5
well it's not a problem )
1.07 - fixed compilation bug in build 1495well it's not a problem )
1.07 - fixed compilation bug in build 1495Great!
Thank you so much.
JSON Serialisation and Deserialisation (native MQL):
Author: o_O
Super library.
However, needs a few "cosmetic" adjustments for the current version of MT5, otherwise errors will be thrown.
After update MetaEditor to Version: 5.00 build 1498, compiling the code generates error bellow:
cannot implicitly convert type 'string' to 'bool'.
Line 53: void operator=(string a) { m_type=a?jtSTR:jtNULL; m_sv=a; m_iv=StringToInteger(m_sv); m_dv=StringToDouble(m_sv); m_bv=a!=NULL; }
It seems that m_type=a?jtSTR:jtNULL is not supported in this version.
However, it needs a few "cosmetic" adjustments for the current version of MT5, otherwise errors will be thrown.
What for?
Version 1.07 compiles without errors.