How to get rid of quotation marks after conversion from JSON to Android XML?

Suppose you have a project where the source file is a JSON file with a row in the format:

"about.moreButton": "Learn more on our website",

When using the Localazy CLI to import to Android with Format Conversions (or when you just try to export the JSON file to Android XML inside the Localazy web platform), you might notice that the format is:

<string name="about_moreButton">"Learn more on our website"</string>

Now, you might think you should delete those start and end quotation marks in the body of the XML row to achieve this result:

<string name="about_moreButton">Learn more on our website</string>

However, you can keep the quotation marks in the Android XML file because it’s a supported construct used to correctly encode white characters that would otherwise be lost in all cases. Quotation marks ensure that the exact form of your strings is preserved after conversion.

In actual use, the text will render correctly on the device.

More information can be found on the Android Developers website: String Resources

Was this article helpful?

Please help us with improving our documentation.
We appreciate all your feedback.