Fermé

I need a Java code

We have a JSON object given below.

{"label":"Country","value":"1","children":[{"label":"USA","value":"2","children":[{"label":"AZ","value":"3","children":[{"label":"Tempe","value":"4","children":[{"label":"Cotton","value":"5","children":[{"label":"Lake","value":"6","leaf":true},{"label":"Sweet","value":"7","leaf":true}]},{"label":"Sun","value":"9","leaf":true}]},{"label":"Mesa","value":"11","leaf":true}]},{"label":"LV","value":"13","children":[{"label":"Casino","value":"17","leaf":true},{"label":"Fountain","value":"19","leaf":true}]}]},{"label":"Mexico","value":"21","children":[{"label":"Guad","value":"7","leaf":true},{"label":"Puerto","value":"3","children":[{"label":"Beach","value":"4","leaf":true},{"label":"Sand","value":"5","leaf":true}]}]}]}

Need to iterate in Java in such a way that for the object whose "leaf" attribute is TRUE, we have to take the "id" attribute to check if it's an ODD number or not.

If it is an ODD number then add

"children": [

{

"label": "Fish",

"value": "420"

},

{

"label": "Duck",

"value": "420"

}

]

to that object.

So as per this logic, the JSON will become

{"label":"Country","value":"1","children":[{"label":"USA","value":"2","children":[{"label":"AZ","value":"3","children":[{"label":"Tempe","value":"4","children":[{"label":"Cotton","value":"5","children":[{"label":"Lake","value":"6","leaf":true,"children":[{"label":"Fish","value":"420"},{"label":"Duck","value":"420"}]},{"label":"Sweet","value":"7","leaf":true,"children":[{"label":"","value":""}]}]},{"label":"Sun","value":"9","leaf":true,"children":[{"label":"","value":""}]}]},{"label":"Mesa","value":"11","leaf":true,"children":[{"label":"","value":""}]}]},{"label":"LV","value":"13","children":[{"label":"Casino","value":"17","leaf":true,"children":[{"label":"","value":""}]},{"label":"Fountain","value":"20","leaf":true,"children":[{"label":"Fish","value":"420"},{"label":"Duck","value":"420"}]}]}]},{"label":"Mexico","value":"21","children":[{"label":"Guad","value":"7","leaf":true,"children":[{"label":"","value":""}]},{"label":"Puerto","value":"3","children":[{"label":"Beach","value":"4","leaf":true,"children":[{"label":"Fish","value":"420"},{"label":"Duck","value":"420"}]},{"label":"Sand","value":"5","leaf":true,"children":[{"label":"","value":""}]}]}]}]}

Compétences : Java, JSON

Concernant l'employeur :
( 0 commentaires ) Phoenix, United States

Nº du projet : #32707656

23 freelances font une offre moyenne de 30 $ pour ce travail

it2051229

Hi there, I do Java programming. I went through your requirements and I would like to do this project if given the opportunity. Let me know if you are interested.

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(1096 Commentaires)
7.7
b0b90

Hi I am an expert Java developer with over 4 years of development experience. I can build you this simple app in 3 days. Let's discuss it over chat Regards

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(72 Commentaires)
5.8
maadirajudata

Hi Greetings I can do this for you with java spring application using jackson library , it would rest api i hope Regards

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(53 Commentaires)
5.8
usaravananbe2004

Hi, Hope you are doing well, I went through your requirements, I am pretty much confident that I can complete this task as I am expert in Java, Json and I have done similar kind of projects already and deliver in few h Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(25 Commentaires)
4.8
vallentinponoma5

Hello? How are you? Thanks for posting this job. I am a Senior Java developer with 8+ years experience in JavaFX and Java Swing. I have been doing this kind of Java projects many times. Please let me know. Best Regards

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(5 Commentaires)
3.7
harfarooqi

Hi I have seen your job description and interested in work of java project. Please provide more details about the work. Best

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 7 jours
(17 Commentaires)
3.6
agrawalad71

Hello, I have worked on JSON objects in Java. I have 4+ years of experience working as a java developer. I can complete this project within given time. Please discuss the details over chat. Thank you.

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(2 Commentaires)
2.7
nlhdung

Hi, I read your description carefully. I have 7+ years experience in Java/.NET/Mobile Android/iOS application development with a lot of applications on Store using Java, C#, C++, Kotlin, Swift, Objective-C. With my ex Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(1 Évaluation)
2.4
anilnivargi49

Hi, I have around 8+ yrs of exp. in java/j2ee and mainly worked in java8, Spring boot, Spring MVC, JPA/Hibernate, RDBMS and NoSQL databases. We can discuss more details over the chat.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 7 jours
(1 Évaluation)
1.2
usamaosama

Hi, Hope You are fine sir. I can Provide You Solution. Your Satisfaction is my first priority sir. my projects include: [login to view URL] [login to view URL]

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 3 jours
(0 Commentaires)
0.0
davidkinyqrut

Hi esteemed client, Did you know accurate bug free code is not sheer luck but 100% work effort from an experienced developer? I am here to confidently ascertain that I will assist in the fixing the Json object and ap Plus

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 2 jours
(0 Commentaires)
0.0
Indrajeet1998Pro

I am a java full stack developer. As i have experience in developing java back end codes and working with json data. I can easily complete your requirements. It's fact that it will be my first project on this site. I w Plus

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 5 jours
(0 Commentaires)
0.0
ShankarKFL

Hello, I am a professional Java developer with 6 years of experience in Java related technologies. I have worked in multiple projects from multiple domains with hands-on experience in Java8 SpringBoot Microservices AWS Plus

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 7 jours
(0 Commentaires)
0.0
robertgazariants

Hi. I can accept right now and can do this in 2hr. I've read your requirements very carefully and I have a good idea. I have 7+years of great experience in Java Spring Boot, Java Plugin. So more specifically my skills Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(0 Commentaires)
0.0
zoyaklocheva

hello. I have a lot of experience working with json objects. for convenience, I prefer written communication and only on this site.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 3 jours
(0 Commentaires)
1.4
atsontakke

Hi, I am Atul Sontakke. I have 2.5 years of experience with Java. I also work on JSON databases. I will finish project as soon as you required. Thank you

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 7 jours
(0 Commentaires)
0.0
tripathishweta58

I have 5+ years of experience in Java and rest API. I have handled JSON object in past.I’m interested to hear more about the project. If you award me the project, I’d be pleased to discuss this further and get started Plus

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 7 jours
(0 Commentaires)
0.0
gsantharam7088

Hi sir/madam, I am a Spring boot developer, I had done many projects in Spring boot, I know to integrate Spring boot with email and SMS service and also web socket connection, I know to deploy the Spring boot in herok Plus

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 7 jours
(0 Commentaires)
2.4
Likari

I have a lot of experience with JSON documents. I often worked with test data which is usually present in JSON files.

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(0 Commentaires)
0.0
Boondar

Hello sir, I checked your requirements and I am interested to work with you for this project. I think my experience makes me the right person for this job.

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(0 Commentaires)
0.0