| //+------------------------------------------------------------------+
|
| //| JSBLMinify.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
|
|
|
| //+------------------------------------------------------------------+
|
| //| |
|
| //+------------------------------------------------------------------+
|
| #define JSONBENCH_RUN_PARSE
|
|
|
| //+------------------------------------------------------------------+
|
| //| |
|
| //+------------------------------------------------------------------+
|
| #include "..\\..\\Src\\JsonNode\\JsonNode.mqh"
|
| #include "..\\..\\Src\\JsonUtils\\JsomMinify.mqh"
|
| #include "Def.mqh"
|
|
|
|
|
| //+------------------------------------------------------------------+
|
| //| Script program start function |
|
| //+------------------------------------------------------------------+
|
| void OnStart()
|
| {
|
| //---
|
| uchar raw[], out[];
|
| ArrayCopy(raw, g_json_data, 0, 0);
|
|
|
| //---
|
| const int t = ArraySize(raw);
|
| TSN::CJsonUtils::MinifyCorrects(raw, t); // corregimos
|
|
|
| //---
|
| ArrayResize(out, t);
|
|
|
| //---
|
| Sleep(500);
|
|
|
| ulong a = GetMicrosecondCount();
|
| for(int i = 0; i < JSONBENCH_TOTAL_ITER_PARSE; i++)
|
| {
|
| int x = 0;
|
| TSN::CJsonUtils::Minify(raw, 0, t, out, x);
|
| }
|
| ulong b = GetMicrosecondCount();
|
|
|
| Sleep(250);
|
|
|
| Print("@", (b - a));
|
| }
|
| //+------------------------------------------------------------------+
|