Find Jobs
Hire Freelancers

Java - Traverse JSON nested object and replace the key name (escape dot to underscore)

$10 USD

Completed
Posted over 5 years ago

$10 USD

Paid on delivery
I have unstructured JSON object ( nested object). Third party API will send lot of JSON files every day, so data is unstructured though JSON compliant. We can not assume some key/values will be there in data. I want to replace the dot symbol in key name with underscore. So it is a recursive call to the entire JSON object and find out deep down keys across all nested elements and get key name replaced with. I have Java Iterator to traverse all the items of JSON but within iterator, it is not allowed to change the key name, how ever it is allowed to change the value of those keys. So we may have to build new [login to view URL] object and reconstruct the entire JSON with replaced key name ( from . to underscore). So, I am looking for quick help to get this done. If key is tried to be replaced with in the iterator, this exception is thrown ( as expected). So it can not be changed in the iterator and will have build new object. Caused by: [login to view URL]: null at [login to view URL]$[login to view URL]([login to view URL]) at [login to view URL]$[login to view URL]([login to view URL])
Project ID: 18321017

About the project

13 proposals
Remote project
Active 5 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Hi, We are a team of professional software developers and we have expertise in Java. Your requirement is pretty straightforward and it can be done within a day. I've already written the code. Below are sample input and output. Input ====== { "originalTitle": "Unforgiven", "originalLanguage": "en", "budget": 14000000, "genres": { "info": { "id": 37, "name": "Western" } }, "imdbId": "tt0105695", "popularity": 10.580995, "productionCompanies": [ { "companyInfo": { "id": 171, "logo_path": null, "name": "MalpasoProductions", "originCountry": "US" } } ], "releaseDate": "1992-08-07", "revenue": 159157447, "runtime": 131, "voteAverage": 7.8, "voteCount": 1469 } Output ======= { "originalTitle": "Unforgiven", "originalLanguage": "en", "budget": 14000000, "genres_info_id": 37, "genres_info_name": "Western", "imdbId": "tt0105695", "popularity": 10.580995, "productionCompanies": [ { "companyInfo_id": 171, "companyInfo_originCountry": "US", "companyInfo_name": "MalpasoProductions" } ], "releaseDate": "1992-08-07", "revenue": 159157447, "voteAverage": 7.8, "runtime": 131, "voteCount": 1469 } You can see that the handling for the array is also in place. Please consider our proposal. Thanks, Team Think&Cooperate
$10 USD in 1 day
4.9 (12 reviews)
3.2
3.2
13 freelancers are bidding on average $16 USD for this job
User Avatar
Hi, I am interested for the project and have an experience in java. Thanks. .
$30 USD in 2 days
4.9 (57 reviews)
5.5
5.5
User Avatar
Hello Sir, We are expert in java and json. please ping me we can start it right now. Will complete by today EOD. Thanks & Regards
$20 USD in 10 days
4.9 (33 reviews)
5.2
5.2
User Avatar
Hi, I have read your job post very carefully. Thank you for this wonderful opportunity. I am very interested to this project. I believe my abilities would be perfect for your venture. I can finish this job within the necessary time frame. I am professional C#.Net Developer and JAVA Developer . I have 4+ years of experience in this field. I have also expert in HTML5,Bootstrap,React.js, node.js, React Native, codeigniter,CSS3,Java Script, Jquery, PHP and Restful api development. Regards, Golam M
$25 USD in 2 days
5.0 (4 reviews)
2.2
2.2
User Avatar
Hi I have enough experience to handle json object . it will be great to deal with such thing again if get a chance to work on such task.
$15 USD in 3 days
5.0 (1 review)
1.1
1.1
User Avatar
Hi, I would like to take your task. Please go through my profile for more details. looking to hear from your side.
$14 USD in 2 days
0.0 (0 reviews)
0.0
0.0
User Avatar
I will complete this JSON related exercise as soon as possible, once i get your json files or json data.
$15 USD in 3 days
0.0 (0 reviews)
0.0
0.0
User Avatar
I have good qualification and relevant skills for this assignment opportunity! Newly activated my freelancer account, I am delighted to experience with minimal cost to the project providers. Look forward to your response ASAP. Thank You.
$10 USD in 2 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Hello, I have already prepared the solution for you. The source code is on my github account, I'll provide you a link right after we negotiate. There's another option, I can just give you a hint right here - don't use "for (element : collection)" iterator in the outer loop, use the full-featured "for ( ; ; )" instead. I currently need any non-zero positive feedback in my profile here, so I'd actually do this even for $0.99, but if you'll pay the full amount, I'll appreciate. P.S. Himanshu S. have provided the output with his bid, it seems this is not exactly what you need. My solution does not touch the original structure of input JSON object, it just changes the dot to underscore in key names.
$10 USD in 0 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
Alpharetta, United States
5.0
1
Payment method verified
Member since Nov 22, 2018

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759) & Freelancer Online India Private Limited (CIN U93000HR2011FTC043854)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.