The original library only supports MQL5, but I made some modifications to support MQL4. You can test the MQL4 version by copying the test script and changing the suffix to mq4.

Original author link: https://www.mql5.com/en/code/62735

Update: Thanks to @fxsaber for the suggestion. The files JsonTypes.mqh, JsonUtils.mqh, and JsonDomBuilder.mqh have been modified to slightly improve parsing speed.