Hi there, firstly thanks for this very powerful tool - is there by any chance some documentation available anywhere? or some more examples of usage? Warm regards
- 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).
- 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).
- 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 знаков после запятой.
- The value of parameter m_prec is corrected (=8)in view of the description DoubleToString.
Wenn sich der Wert m_prec im Bereich von 0 bis 16 befindet,bekommt man die Zeilendarstellung der Zahl mit der angegebenen Zahl der Dezimalzeichen. 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.
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
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
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