| //+------------------------------------------------------------------+
|
| //| BTest.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\\JsonNode.mqh"
|
|
|
| //+------------------------------------------------------------------+
|
| //| Script program start function |
|
| //+------------------------------------------------------------------+
|
| void OnStart()
|
| {
|
| //---
|
| TSN::CJsonBuilderStr build;
|
| build.PutChar('"');
|
| build.Obj();
|
| build.Key("number").Val(128910.02568599);
|
| build.Key("nuber");
|
| const int locked = build.m_pos;
|
|
|
| ulong a = GetMicrosecondCount();
|
| for(int i = 0; i < 100000; i++)
|
| {
|
| build.m_pos = locked;
|
| build.Val(i);
|
| }
|
| ulong b = GetMicrosecondCount() - a;
|
| Print("time: ", b);
|
|
|
| a = GetMicrosecondCount();
|
| for(int i = 0; i < 100000; i++)
|
| {
|
| build.m_pos = locked;
|
| build.PutRaw(IntegerToString(i));
|
| }
|
| b = GetMicrosecondCount() - a;
|
| Print("time: ", b);
|
|
|
|
|
|
|
| build.Key("Valor").ValS("└");
|
| build.Key("asas").ValS("\r\n\v\t aaaaa");
|
| build.KeyWV("asasas").Val(true);
|
| build.EndObj();
|
| build.PutChar('"');
|
| Print(build.Build());
|
| }
|
| //+------------------------------------------------------------------+
|