I am using Java and I have:
Boolean happiness;
JSONObject happyJSON = new JSONObject();
happyJSON.put("happy", happiness);
-
So right now, when the boolean is true, my output (in a jsonfile) looks like this:
{"happiness":true}
But I am trying to output it like this:
{
"happiness":true
}
On three different lines, with the proper indentation. Thank you for your advice.