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 6648161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:37:21+00:00 2026-05-26T00:37:21+00:00

Is their an easy way or library to convert a JSON String to a

  • 0

Is their an easy way or library to convert a JSON String to a Java object such that I can easily reference the elements in a JSP page? I think Map‘s can be referenced with simple dot notation in JSP pages, so JSON -> Map object should work?

UPDATE: Thank you for all the JSON Java libraries. In particular, I’m looking for a library that makes it easy for consumption in JSP pages. That means either the Java object created has appropriate getter methods corresponding to names of JSON nodes (is this possible?) or there’s some other mechanism which makes it easy like the Map object.

  • 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-26T00:37:22+00:00Added an answer on May 26, 2026 at 12:37 am

    Use Jackson.

    Updated:

    If you have an arbitrary json string Jackson can return a map object to access the properties values.

    Here a simple example.

    @Test
    public void testJsonMap() throws JsonParseException, JsonMappingException, IOException {
        String json = "{\"number\":\"8119123912\",\"msg\":\"Hello world\"}";
        ObjectMapper mapper = new ObjectMapper();
        Map<String, Object> map = mapper.readValue(json, new TypeReference<Map<String,Object>>() { });
        System.out.println("number:" + map.get("number") + " msg:" + map.get("msg"));
    }
    

    Output:

    number:8119123912 msg:Hello world

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there an easy way to copy a nested Array so that every object
Is there an easy and straight-forward method to select elements based on their data
Is their a way to access a web server such as windows server 2003
Is their a way to use a non-member non-friend function on an object using
In their documentation Telerik says that there is a way to disable sorting for
Is there an easy way to trim a String based on his Offset and
TL;DR: The question is: Do you know of a cross-platform library that I can
An easy jQuery question. I have several identical forms ( except their name )
Their roadmap says their next release will be in March 2009, and that they'll
Is their any profilers that support Silverlight? I have tried ANTS (Version 3.1) without

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.