title: Remove carriage return from json text
body: <p>I get json text returned from an api call and I run it trough a script JSON Serialization and Deserialization from here <a href="https://www.mql5.com/en/code/13663" rel="nofollow noreferrer">https://www.mql5.com/en/code/13663</a>.</p>
  
  <p>My issue is that it only process the first few parts of the json because of what I believe to a linebreak/carriage inside the json structure. I dont get any error message, just an array containing everything before that line break.</p>
  
  <p>I dont want to remove the line breaks inside the text fields in the json, only the returns inside the json structure. It is in the place each time just after <code>{"ok":true,"result":[{"update_id":568022212,</code></p>
  
  <p>Here is a full section</p>
  
  <pre><code>{"ok":true,"result":[{"update_id":568022212,
  "channel_post":{"message_id":436,"chat":{"id":-1001436032340,"title":"FORTUNA","type":"channel"},"date":1588899840,"reply_to_message":{"message_id":372,"chat":{"id":-1001436032340,"title":"FORTUNA","type":"channel"},"date":1588838583,"text":"A\nGbpusd buy now 1.2360\nSl 1.2280 \nTp open\n","entities":[{"offset":52,"length":11,"type":"mention"}]},"text":"A\n42 pips bookd close\ud83d\udfe2\ud83d\udfe2"}},{"update_id":568022213,
  "channel_post":{"message_id":437,"chat":{"id":-1001436032340,"title":"FORTUNA","type":"channel"},"date":1588900321,"reply_to_message":{"message_id":435,"chat":{"id":-1001436032340,"title":"FORTUNA","type":"channel"},"date":1588893671,"text":"A\nGold buy 1713.3\nSl 1702 \nTp open\nSwing trade"},"text":"Amazon\n60 pips bookd close\ud83d\udfe2\ud83d\udfe2"}},{"update_id":568022214,
  "channel_post":{"message_id":438,"chat":{"id":-1001436032340,"title":"FORTUNA","type":"channel"},
  </code></pre>
  
  <p>MQL4 code:</p>
  
  <pre><code> int   GetUpdates()
       {
        if(m_token==NULL)
           return(ERR_TOKEN_ISEMPTY);
  
        string out;
        string url=StringFormat("%s/bot%s/getUpdates",TELEGRAM_BASE_URL,m_token);
        string params=StringFormat("offset=%d",m_update_id);
        //---
        int res=PostRequest(out,url,params,WEB_TIMEOUT);
        if(res==0)
          {
  
           Print(StringDecode(out));
           //--- parse result
           CJAVal js(NULL,jtUNDEF);
           bool done=js.Deserialize(out);
           if(!done)
              return(ERR_JSON_PARSING);
  
           bool ok=js["ok"].ToBool();
           if(!ok)
              return(ERR_JSON_NOT_OK);
  
           CCustomMessage msg;
  
           int total=ArraySize(js["result"].m_e);
           for(int i=0; i&lt;total; i++)
             {
              CJAVal item=js["result"].m_e[i];
              //---
              msg.update_id=item["update_id"].ToInt();
  
              //---
              msg.message_id=item["message"]["message_id"].ToInt();
              msg.message_date=(datetime)item["message"]["date"].ToInt();
              //---
              msg.message_text=item["message"]["text"].ToStr();
              printf((datetime)item["message"]["date"].ToInt());
              msg.message_text=StringDecode(msg.message_text);
              //---
              msg.from_id=item["message"]["from"]["id"].ToInt();
  
              msg.from_first_name=item["message"]["from"]["first_name"].ToStr();
              msg.from_first_name=StringDecode(msg.from_first_name);
  
              msg.from_last_name=item["message"]["from"]["last_name"].ToStr();
              msg.from_last_name=StringDecode(msg.from_last_name);
  
              msg.from_username=item["message"]["from"]["username"].ToStr();
              msg.from_username=StringDecode(msg.from_username);
              //---
              msg.chat_id=item["message"]["chat"]["id"].ToInt();
  
              msg.chat_first_name=item["message"]["chat"]["first_name"].ToStr();
              msg.chat_first_name=StringDecode(msg.chat_first_name);
  
              msg.chat_last_name=item["message"]["chat"]["last_name"].ToStr();
              msg.chat_last_name=StringDecode(msg.chat_last_name);
  
              msg.chat_username=item["message"]["chat"]["username"].ToStr();
              msg.chat_username=StringDecode(msg.chat_username);
  </code></pre>