> JSON is much easier to directly access and manipulate in JS compared to XML
and yet a single newline in a text field will shatter its validity or force you to enter escaping-hell.
(I tamed that entire general problem by making https://github.com/pmarreck/printable_binary, and it will permit you to pack all binary data into a string, without any escaping issues, while retaining ascii legibility, although that requires a decoding step.)