2026-09-03 11:13:49 -05:00 | | | //+------------------------------------------------------------------+
|
2026-06-03 14:16:03 -05:00 | | | //| 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
|
| | |
|
| | | //+------------------------------------------------------------------+
|
| | | //| |
|
| | | //+------------------------------------------------------------------+
|
2026-09-03 11:13:49 -05:00 | | | #include "..\\Src\\Json.mqh"
|
2026-06-03 14:16:03 -05:00 | | |
|
| | | //+------------------------------------------------------------------+
|
| | | //| Script program start function |
|
| | | //+------------------------------------------------------------------+
|
| | | void OnStart()
|
| | | {
|
| | | //---
|
2026-07-13 18:47:16 -05:00 | | | TSN::CJsonBuilderStr build;
|
| | | build.PutChar('"');
|
2026-06-03 14:16:03 -05:00 | | | build.Obj();
|
2026-07-14 09:22:38 -05:00 | | | build.Key("number").Val(128910.02568599);
|
| | | build.Key("nuber");
|
| | | const int locked = build.m_pos;
|
| | |
|
| | | ulong a = GetMicrosecondCount();
|
2026-09-19 22:46:26 -05:00 | | | for(uint i = 0; i < 100000; i++)
|
2026-07-14 09:22:38 -05:00 | | | {
|
| | | build.m_pos = locked;
|
| | | build.Val(i);
|
| | | }
|
| | | ulong b = GetMicrosecondCount() - a;
|
| | | Print("time: ", b);
|
| | |
|
| | | a = GetMicrosecondCount();
|
2026-09-19 22:46:26 -05:00 | | | for(uint i = 0; i < 100000; i++)
|
2026-07-14 09:22:38 -05:00 | | | {
|
| | | build.m_pos = locked;
|
| | | build.PutRaw(IntegerToString(i));
|
| | | }
|
| | | b = GetMicrosecondCount() - a;
|
| | | Print("time: ", b);
|
| | |
|
| | |
|
| | |
|
2026-06-03 14:16:03 -05:00 | | | build.Key("Valor").ValS("└");
|
2026-06-30 08:24:44 -05:00 | | | build.Key("asas").ValS("\r\n\v\t aaaaa");
|
2026-07-14 09:22:38 -05:00 | | | build.KeyWV("asasas").Val(true);
|
2026-06-03 14:16:03 -05:00 | | | build.EndObj();
|
2026-07-13 18:47:16 -05:00 | | | build.PutChar('"');
|
2026-07-14 09:22:38 -05:00 | | | Print(build.Build());
|
2026-06-03 14:16:03 -05:00 | | | }
|
| | | //+------------------------------------------------------------------+
|