
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
v 1.09
- added possibility to serialise double numbers with specified precision (default was 8 digits).
For this purpose, added accuracy parameter m_prec, which can be set either manually or when calling the constructor or Add function.
- fixed bug in MT4 due to different behaviour of ArrayCopy function from MT5 (WHOLE_ARRAY constant is different).
v 1.09
- added possibility to serialise double numbers with specified precision (default was 8 digits).
For this purpose, added accuracy parameter m_prec, which can be set either manually or when calling the constructor or Add function.
- fixed a bug in MT4 due to different behaviour of ArrayCopy function from MT5 (WHOLE_ARRAY constant is different).
calling ArraySize( js["json value"] ) from my code;
gives a compilation error
'operator[]' - variable expected
using mql 4
to solve the problem I added to JAson.mqh:
int size() { return ArraySize(m_e); }
to determine the array size
question: is there any way to determine the array size?
Maybe I haven't found it.
apparently you need to do it like this
ArraySize( js["json value"].m_e )
internal function size() is more convenient for me.
1.10
Added int Size() function to return the number of elements
example
n=js["object_name"].Size(); // количество элементов в объекте
n=js["array_name"].Size(); // количество элементов в массиве
// альтернатива
n=ArraySize(js["object_name"].m_e);
n=ArraySize(js["array_name"].m_e);
1.10
Added int Size() function to return the number of elements
example
n=js["object_name"].Size(); // количество элементов в объекте
n=js["array_name"].Size(); // количество элементов в массиве
// альтернатива
n=ArraySize(js["object_name"].m_e);
n=ArraySize(js["array_name"].m_e);
Great! nice work thanks for the code!
v 1.11
- fixed default value of m_prec parameter (to =8) taking into account behaviour of DoubleToString function
Если значение m_prec лежит в диапазоне от 0 до 16, то будет получено строковое представление числа с указанным количество знаков после запятой.
Если значение m_prec лежит в диапазоне от -1 до -16, то будет получено строковое представление числа в научном формате с указанным количеством знаков после запятой.
Во всех остальных случаях строковое представление числа будет содержать 8 знаков после запятой.
v 1.11
- The value of parameter m_prec is corrected (=8)in view of the description DoubleToString.
Wenn sich der Wert m_prec im Bereich von -1 bis -16 befindet, bekommt man Zeilendarstellung der Zahl im wissenschaftlichen Format mit der angegebenen Anzahl der Dezimalzeichen nach dem Komma.
In allen anderen Faellen wird der Zeilenwert der Zahl 8 Dezimalzeichen nach dem Komma enthalten.
Thank you!
Wonderful library.
v1.08
Fixed parsing of array of arrays (e.g. { "a":[[1],[2]] } )
Alexey, how do you "parse" an array of arrays? I'm writing a library for telegram right now, the custom keyboard is a json object of an array of arrays of arrays of json objects