We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed case:
#include <JAson.mqh> int OnInit(){ CJAVal data; // simple structure data["a"] = 12; // nested structure CJAVal nested_data; nested_data["k1"] = 7; nested_data["k2"] = "baz"; data["b"] = nested_data; Print(data["b"]["k1"].ToInt()); // 0 instead of 7 Print(data["b"]["k2"].ToStr()); // "" instead of "baz" Print(data.Serialize()); // {"a":12,"":{"k1":7,"k2":"baz"},"b":{}} instead of {"a":12,"b":{"k1":7,"k2":"baz"}} }
As workaround, you need use Set() method:
Set()
data["b"].Set(nested_data); Print(data["b"]["k1"].ToInt()); // 7 Print(data["b"]["k2"].ToStr()); // "baz" Print(data.Serialize()); // {"a":12,"b":{"k1":7,"k2":"baz"}}
I tryed fix this bug, but I have no deep knowledge of the language in mql (c++) and I can not fix this bug.
If anyone can help, then many MQL-developers will be grateful as this bug has been around for many years.
The text was updated successfully, but these errors were encountered:
2df29ad
Thanks to Laszlo Tormasi, who fixed this bug.
Sorry, something went wrong.
No branches or pull requests
Failed case:
As workaround, you need use
Set()
method:I tryed fix this bug, but I have no deep knowledge of the language in mql (c++) and I can not fix this bug.
If anyone can help, then many MQL-developers will be grateful as this bug has been around for many years.
The text was updated successfully, but these errors were encountered: