Is it possible to write an HTML string inside JSON?
Which I want to write like below in my JSON file:
[
{
\"id\": \"services.html\",
Just encode html using Base64 algorithm before adding html to the JSON and decode html using Base64 when you read.
byte[] utf8 = htmlMessage.getBytes("UTF8");
htmlMessage= new String(new Base64().encode(utf8));
byte[] dec = new Base64().decode(htmlMessage.getBytes());
htmlMessage = new String(dec , "UTF8");