//+------------------------------------------------------------------+ //| Pointer.mq5 | //| Copyright 2026, Niquel Mendoza | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2026, Niquel Mendoza" #property link "https://www.mql5.com" #property version "1.00" #property strict //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ #include "..\\Src\\Json.mqh" #resource "json_pointer.json" as const string g_json //+------------------------------------------------------------------+ //| Script program start function | //+------------------------------------------------------------------+ void OnStart() { //--- TSN::CJsonParser parser; parser.Assing(g_json); parser.CorrectPadding(); parser.Parse(); //--- TSN::BSFLPointerCompiler compiler; //--- TSN::BSFLPointerQuery query("/config~1general/riesgo~0maximo", compiler); //--- TSN::CJsonNode root = parser.GetRoot(); //--- Print("--- CJsonNode ---"); Print(root[query].ToDouble(0.0)); query.Set("/raro~1~0mix~0~11", compiler); Print(root[query].ToString("")); query.Set("/ordenes/2/tags/2", compiler); query.CintaTypesInfo(); Print(root[query].ToString("")); //--- TSN::CDomNodeManager manager; TSN::CDomNodeBase node(&manager); root.ToDom(&node, &manager); Print("--- CJsonPointerResolver ---"); Print(node[query].ToString()); } //+------------------------------------------------------------------+