How to parse the json file using ObjectMapper

i am trying to solve by using
ObjectMapper objectMapper = getObjectMapper();
List temp = objectMapper.readValue(fileName ,List().class);
anyone guide me

there is function name resolveFileFromResources to get file name which is already there in Portfoliomanagerapplication.java file.

yes i used that function to get file path

@rishi2907, if you are having trouble understanding how the readValue method has to be used, this might be helpful

There’s also a FAQ detailing on dealing with JSON and Jackson API

can i use
PortfolioTrade[] temp = getObjectMapper().readValue(fileName, PortfolioTrade[].class);
in setup 2 for module 1

@rishi2907
Can you verify these,

  1. Are you running the tests while in the dev-rishiagrawal-ME_QMONEY directory?
  2. Have you set this directory itself when starting VSCode using the Open Folder option?

yes yes

Seems like there’s an FAQ on this topic.

i gone through all the FAQ of Module 1
unable to find similar issue

both test function are passed

but build is failing

Kindly see this if you haven’t already

1 Like

thanks build successfully

Quick heads up - The search feature on the top right will suggest similar posts even if we type in part of our queries like the error info

Try putting in “Package does not exists” inside it

Happy Learning! :slight_smile: