3 Replies Latest reply on Apr 16, 2019 8:31 AM by Mehul Sorathiya

    How to prevent util:toJSON() function replaces break lines into '\n'

    Mehul Sorathiya Seasoned Veteran

      Hello All -


      My Input to util:toJSON() function is below XML.



      <address1>Address 1</address1>

      <address2>Address 2

      Address 3</address2>



      Here address2 element contains break line between Address 2 & Address 3.


      The Json output is below :


      "address2": "Address 2\nAddress 3"


      The expected output is :


      "address2": "Address 2

      Address 3"


      How can I achieve this please let me know. Thanks !