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

  • Home
  • SEARCH
  • 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 5849165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:57:41+00:00 2026-05-22T12:57:41+00:00

I have seen there are many JSON parsers in Java. Some target speed, some

  • 0

I have seen there are many JSON parsers in Java. Some target speed, some target accuracy, some target flexibility (streaming, buffering, etc). Some have use special subclasses of the collections api instead of using the ones that are already there. That seems bloated to me.

So I would like to know, which one(s) tackle the job of string to object conversion in the shortest/simplest manner? (as in, less code)

Edit: I am sorry I was not clear. What I mean is the smallest parser. So if one parser was 600 lines and the other was 400 lines. I don’t care which is faster so much as which is easier to understand. This is not to be confused with how many lines it takes to invoke the parser. I expect almost all would be just a few lines of code and if I have to add a convenience method that is OK.

Purpose is more of an educational thing, how is it done, and the wish to use APIs where it is easy to see how it works.

  • 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-22T12:57:41+00:00Added an answer on May 22, 2026 at 12:57 pm

    I can think of two. Jackson or Gson. I’ll add some examples.

    GSON

    Gson gson = new Gson();
    Long one = gson.fromJson("1", Long.class);
    

    Jackson

    ObjectMapper mapper = new ObjectMapper(); // can reuse, share globally
    User user = mapper.readValue(new File("user.json"), User.class);
    

    Jackson is a little faster so its up to you what you want.

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

Sidebar

Related Questions

Are there any tools to effectively compare two XML schema's? I have seen some
Today, I have seen some legacy code. In the destructor there is a statement
I have seen many projects using simplejson module instead of json module from the
I have seen in the output-Window of Visual Studio, that there occurs many times
I have seen many Android answers that suggest calling the garbage collector in some
First of all I have seen that there are many questions about unrecognized selector
I have seen this question: Are there any decent UI components for touch screen
Have you ever seen any of there error messages? -- SQL Server 2000 Could
There are so many plugins/gems but must of them have outdated documentation or no
When I receive code I have not seen before to refactor it into some

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.