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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:13:00+00:00 2026-06-14T05:13:00+00:00

I have two java classes for parsing jason into java alone. Beyond that, the

  • 0

I have two java classes for parsing jason into java alone. Beyond that, the classes are not used for any thing. Below are the two classes.

import java.util.ArrayList;

public class PaymentsPaid {

    public ArrayList<PaidDetailAmounts> amount;
}

and

public class PaidDetailAmounts {

    public Long invoiceFeeId;

    public Double amountPaid;
}

Here is where the string and the use of and object mapper.

 "amount": [{"invoiceFeeId": 12085, "amountPaid": 100},{"invoiceFeeId": 12084, "amountPaid": 100},{"invoiceFeeId": 12086, "amountPaid": 500}]

and the mapper code

ObjectMapper mapper = new ObjectMapper();        
try {
    PaymentsPaid paymentsPaidModel = mapper.readValue(httpServletRequest.getParameter("amount"), PaymentsPaid.class);
   /*
    Iterator<PaidDetailAmounts> iterator = paymentsPaidModel.amount.iterator();
    while (iterator.hasNext()) {
        System.out.println(iterator.next().invoiceFeeId);
    }
    */
} catch (JsonParseException e) {
    e.printStackTrace();
} catch (IOException e) {
    e.printStackTrace();
}

This is my exception:

org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field ”
invoiceFeeId” (Class PACKAGE_NAME.PaymentsPaid), not marked as ignorable

I must be doing something worng, because I built a search feature using this approach and it is currently in my application and working well. Please advise. I think it may be a mal formed json string, because it should be an array.

  • 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-06-14T05:13:01+00:00Added an answer on June 14, 2026 at 5:13 am

    The Problem seams to be that jackson tryes to access the invoiceFeeId field of class PaymentsPaid, but it is a field of class PaidDetailAmounts.

    I think there is some surrounding brackets missing in your Json string:

    {  // <-- missing?
      "amount": [{"invoiceFeeId":...}]
    }  // <-- missing?
    

    But I am not an JSON expert, so I would try to write an simple test case that create a JSON string from some Java Objects and then parse this strings to back to Java Objects. So that the test can assert that both (sets of) objects are equals.

    Then you can use the JSON String created by the test and compare it with your input, I would expect that the (missing) brackets are the difference between them.

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

Sidebar

Related Questions

I have two of the following java classes (listed below) Class BookInfo declares static
Does it impact memory if I have two Java classes that have native calls
I have two java classes. Schedule is the main class that uses an array
Imagine that I have two classes (shown below). Now imagine that I am compiling
I have two java classes as follows App1 without a package: class App1 {
I'm making a shopping list mobile application (Java ME) and i have two classes;
How do I do forward declarations in Java? I have two classes, each needs
I have two Java interfaces and one implementing class. (I have used Eclipse to
I have two Java applications in my network that talk to each other over
Say I have two Java apps that I wrote: Ping.jar and Pong.jar and they

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.