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...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


  • 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");