Posting HTML in JSON
From Logic Wiki
Revision as of 13:27, 27 August 2024 by AliIybar (Talk | contribs) (Created page with "Category:JSON Category:API * Encode the file before sending <pre> byte[] utf8 = htmlMessage.getBytes("UTF8"); htmlMessage= new String(new Base64().encode(utf8)); </p...")
- Encode the file before sending
byte[] utf8 = htmlMessage.getBytes("UTF8");
htmlMessage= new String(new Base64().encode(utf8));
- Decode the file after receiving
byte[] dec = new Base64().decode(htmlMessage.getBytes()); htmlMessage = new String(dec , "UTF8");