title: Unable to append "," after key-value pair in JSON file when i am converting from XML to Json using java
body: <p>I am trying to convert xml to json and writing this json to a file,in the log am getting proper result in the form of key value pair since logs and prints deals with String but durin run-time the same is not getting reflected as no "," is getting appended after value</p>
  
  <pre><code>    String xml = builder.toString();
      ObjectMapper mapper = new ObjectMapper();
      JSONObject jsonObj = XML.toJSONObject(xml,false);
      FileWriter fileWriter =new FileWriter(outputFileName);
      BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);  
      Object json = mapper.readValue(jsonObj.toString(), Object.class);
      ObjectWriter writer = mapper.writer(new DefaultPrettyPrinter());
      writer.writeValue(new File(outputFileName), json);`
  </code></pre>
  
  <p>The log ouptput is</p>
  
  <pre><code>{
    "cobrandCardPopup" : {
      "linkClickId" : "T10_AirActiveNeedsNonAirOnboarding_HasCardSE_HighMilesBalance",
      "linkLinkStatus" : "_self",
      "LinkTitleAttr" : "",
      "linkFollowCheckbox" : "",
      "linkURL" : "http://hotels.jetprivilege.com",
      "LinkAriaLabel" : "",
      "ToasterImageContainer" : {
        "ToasterMobileImage" : "/iwov-resources/images/splash-popups/Hotel_Mob.gif",
        "ToasterImage" : "/iwov-resources/images/splash-popups/Hotel.gif",
        "ToasterMobileImageAltText" : "Hotel",
        "ToasterImageAltText" : "Hotel"
      },
      "LinkRoleAttr" : "",
      "ToasterTextContainer" : {
        "popupInterval" : "",
        "linkText" : "",
        "popupText" : ""
      },
      "ToasterType" : "Image"
    }
  }
  </code></pre>
  
  <p>The file has</p>
  
  <pre><code>{
    "cobrandCardPopup" : {
      "linkClickId" : "T10_AirActiveNeedsNonAirOnboarding_HasCardSE_HighMilesBalance"
      "linkLinkStatus" : "_self"
      "LinkTitleAttr" : ""
      "linkFollowCheckbox" : ""
      "linkURL" : "http://hotels.jetprivilege.com"
      "LinkAriaLabel" : ""
      "ToasterImageContainer" : {
        "ToasterMobileImage" : "/iwov-resources/images/splash-popups/Hotel_Mob.gif"
        "ToasterImage" : "/iwov-resources/images/splash-popups/Hotel.gif"
        "ToasterMobileImageAltText" : "Hotel"
        "ToasterImageAltText" : "Hotel"
      },
      "LinkRoleAttr" : ""
      "ToasterTextContainer" : {
        "popupInterval" : ""
        "linkText" : ""
        "popupText" : ""
      },
      "ToasterType" : "Image"
    }
  }
  </code></pre>