Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4238472
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T02:54:33+00:00 2026-05-21T02:54:33+00:00

can anybody help me parsing HTML tags in JSON? I got tags like <b>,

  • 0

can anybody help me parsing HTML tags in JSON?
I got tags like <b>, <p>, etc. on the values of my JSON file. And I want to be able to parse them, so the text which is displayed on my app is shown based on the HTML tags.

here’s my JSON parsing code:

void examineJSONFile()
    {
        try
        {

            String y = "";
            InputStream is = this.getResources().openRawResource(R.raw.uni);
            Writer writer = new StringWriter();
            char[] buffer = new char[1024];

            try {
              BufferedReader reader = new BufferedReader(
                new InputStreamReader(is, "Unicode")
              );
              int n;
              while ((n = reader.read(buffer)) != -1) {
                writer.write(buffer, 0, n);
              }
            } finally {
              is.close();
            }

            String jsontext = writer.toString();
            JSONArray entries = new JSONArray(jsontext);


            int j;
            for (j=0;j<entries.length();j++)
            {
                JSONObject post = entries.getJSONObject(j);
                y += post.getString("description") + "\n";
            }
            txt_beschreibung.setText(y);
        }
        catch (Exception je)
        {
            txt_beschreibung.setText("Error w/file: " + je.getMessage());
        }

    }

and here’s the sample of my JSON file:

[{
  "title": "CARE Deutschland-Luxemburg e.V.",
  "keyword": "CARE",
  "description": "<p><b>Das CARE-Komplett-Paket für Menschen in Not</b></p><p>Schnell, nachhaltig und durchdacht, das ist das moderne CARE-Paket. CARE ist überzeugt, dass umfassende Hilfe von drei Seiten notwendig ist, um die weltweite Armut Schritt für Schritt zu verringern. Deswegen hat CARE sich seit seiner Gründung 1945 und dem Abwurf der ersten CARE-Pakete über Berlin weiter entwickelt. Heute steckt im CARE-Paket weit mehr als Zucker und Mehl. Heute bietet die Organisation in 70 der ärmsten Länder der Welt ein Komplett-Paket für Menschen in Not.</p><p><b>Das Komplett-Paket für Menschen in Not enthält:</b></p>*sofortige Nothilfe nach Katastrophen<br><br>*langfristige Entwicklungszusammenarbeit<br><br>*Schutz der Menschenrechte<br><br>",
  "smallImageUrl": "http://cdn.spendino.de/web/img/projects/home/1284113658.jpg",
  "bigImageUrl":"http://cdn.spendino.de/web/img/projects/small/1284113658.jpg",
  "cost": "5"
  },
  {
  "title": "Brot für die Welt",
  "keyword": "BROT",
  "description": "<p>„Brot für die Welt“ unterstützt unter der Maßgabe 'Helfen, wo die Not am größten ist' ausgewählte Projekte weltweit.</p><p>Von Angola bis Tansania, von der Förderung von Mahlzeiten bis zur gesundheitlichen Grundversorgung und Katastrophenhilfe.</p><p>Bei ihrem täglichen Kampf gegen Krankheiten, Hunger, Ungerechtigkeiten und Armut wird die Aktion „Brot für die Welt“ von der evangelischen Kirche unterstützt.</p><p>Die Aktion hat es sich zum Ziel gesetzt, die Entwicklungszusammenarbeit auf der ganzen Welt zu fördern und Hilfe zur Selbsthilfe zu leisten.</p>",
  "smallImageUrl": "http://cdn.spendino.de/web/img/projects/home/1267454286.jpg",
  "bigImageUrl":"http://cdn.spendino.de/web/img/projects/small/1267454286.jpg",
  "cost": "5"
  }]

Anything I can add on my method. I’m looking for a specific answer to my problem but I open to any kind of solution.
Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T02:54:34+00:00Added an answer on May 21, 2026 at 2:54 am

    Have a look at android.text.Html.

    You can use this to do something like:

    textView.setText(Html.fromHtml("Hello, <b>I am bold</b>"));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have posted my html response.Can anybody help me with me parsing the following
can anybody help me solve this : i got $filename= index 198.php; i use
Can anybody help with converting an SDL_Surface object, a texture loaded from a file,
Can anybody help me out? I would like to store a hex colorPicker value
Can anybody help me to get the file size before I start downloading display
Hi can anybody help me out from this. I have an HTML page. This
Can anybody help me how can I invoke a JSP page from a Servlet
can anybody help me understand how Honda achieved this effect: http://testdays.hondamoto.ch/ I mean the
Can anybody help me in finding out how to verify that _tmkdir succeeded. For
Can anybody help how to setup a automatic backup of mysql database and then

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.