Libraries: JSON Serialization and Deserialization (native MQL) - page 12

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
Would anyone or the author answer if this is supposed to support nested JSON? That is a CJAVal instance contains a keys '2', and '3' which are another CJAVal instance. Code seems to run but when serialized the keys are blank.
Example, I am getting:
But should be getting
https://www.mql5.com/ru/forum/63015
a few examples
array of arrays
Great design, thanks bro! Works like clockwork, used it in my robot.
There are some bugs in the bible. attached is the corrected version, thanks to the author and probably won't mind.
Hello,
I try to use this library to read a json file.
could you provide an exemple in a such case ?
My first lines are :
What have I to do in order to store somes values from json file in my variables ?
Thanks for the help !
Erwann.
After somes researchs I solve my problem :)
It's not necessary to use string table [] because of limitation of string is 256 bytes.
There is no string limitation length in fact (only for initialisation between quotes "".
So you just have to use this code :
the s string variable could have a length more than 256 charachters :)
Bye,
Erwann.
Would anyone or the author answer if this is supposed to support nested JSON? That is a CJAVal instance contains a keys '2', and '3' which are another CJAVal instance. Code seems to run but when serialized the keys are blank.
Example, I am getting:
But should be getting
Daniel, I ran into the issue with empty keys as well, when using nested JSON objects (not arrays). I resolved it by using the Set() function. Example:
there are some bugs in the bible. attached is the corrected version, thanks to the author and probably won't mind.
thanks!
How do I remove an element from a JSON tree. There is method to Set, to Add but not to Delete
Thanks in advance
awesome,I have added ulong and datetime type support to it.
the WebRequest result is an array. and i invoke like this
jv.Deserialize( result);
how can i iterate it
'
you can use jv[0]["a"].ToInt() to get 1,jv[1]["a"].ToInt() to get 2