Home > OS >  Bold words in a string of json file in Android
Bold words in a string of json file in Android

Time:02-21

I have a long text in one of the strings at json file. I want to make bold of some words in that text.

How can I do it?

sample.json file:

    {
        "local_id": "82",
        "local_title": "He is Lord",
        "local_hint": "He is Lord",
        "local_text": "He is Lord, He is Lord\nHe is risen from the dead and He is Lord\nEvery knee shall bow,\nevery tongue confess\nThat Jesus Christ is Lord.",
        "local_category": "nothing",
        "local_categorycount": "1"


    }

CodePudding user response:

JSON only stores plain text, It does not format the text, if you want to make the data in the JSON object appear bold or colorful in the UI you need to handle this from the front end side.

  • Related