How many functions I have to modify for getting output as I am getting empty INFO[ ]!

@visargdesai
How many functions I have to modify for getting output as I am getting empty INFO [ ].
Please name these functions.

Instead of saying modifications , I can tell you that you have to use the functions which are already given to you (its mentioned in TODOs)
The reason you are getting " INFO [ ] " is that because you are not returning symbols(as a list)

We cant name the functions. Look in forum for related topics. You might get some hint

I have created array of objects but How will I return it ?

return it with the name of the list (the list that you created in mainReadFile function). As simple as that. Check the return type in the function (mainReadFile), it should match

But in the bottom of the functions there is already some code is pre written. Is not this code returning listerror4

you are looking at debugOutputs(), but you have to return list from mainReadFile (all your coding part should be here). Read both the TODOs

1 Like

In your mainReadFile function their will be return Collections.emptyList(); You just need to replace the return statement with your list.

1 Like

What does getObjectMapper() function is doing here?
Does this code is not sufficient for creating objects
ObjectMapper mapper = new ObjectMapper();

It is sufficient, try read the getObjectMapper function carefully and also read about JavaTimeModule
which is present in the getObjectMapper, you’ll get the answer.

check this FAQ and also the link provided, before you proceed further, it really helps ( ignore if you’ve already seen it )

I have seen it. It is just telling create array of objects not just one object

@AmoghaKS @Shreyas_Subhedar Can you help me in this. I am still not getting INFO[] outputs.
Both Test Cases of Mainreadfile are failing


Opps i just saw the half of the screenshot @amanagar is correct

Hey @vipulkrishna you just have to modify the functions where todo’s are mentioned nothing else before editing function or creating function you need to understand what is that function returning as mentioned in todo’s if you are having trouble understanding particular part or object spend significant amount of time and read some references regarding that thing like you have mentioned what is getObjectMapper() function is doing here because it is returning ObjectMapper() object which is registering the reference of JavaTimeModule which will help you reading dates in Localtime object format.

Then the Error makes sense because I am not using getObjectMapper() Function
But for using that function, what will I pass in that function because It has no input arguments.

I am not able to use getObjectMapper() in my code of mainReadFile()

Check the prototype of the function carefully.
is it accepting any parameters, no right…so you need not pass any arguments, then what’s the use of that function…check the return type…“ObjectMapper”, that provides you the functionality for reading and writing JSON

3 Likes

@AmoghaKS @Shreyas_Subhedar @amanagar You Guys are awesome! But Specially you @AmoghaKS :heart_eyes: your last line was The Game-Changer. All test cases passed with Code Quality.

2 Likes

It’s a pleasure :upside_down_face: