Find Jobs
Hire Freelancers

Serialize C header structures to/from json

$250-750 USD

Preklicano
Objavljeno pred skoraj 5 leti

$250-750 USD

Plačilo ob dostavi
I have around 40 header files containing data structures the I need to be able to convert to and from json. I have an existing framework/base class that is based on RapidJson that simplifies the process and matches my needs. Most of the data structures are fairly simple. There are a few that are more involved and have embedded arrays or other embedded structures. The base class mostly encapsulates and hides the json library, however for the few structures that are more complicated, you may need to extend the base class to include additional functionality (for which you will probably need to spend some time learning how to work with RapidJson). You will receive the framework, the source header files, and data files to test with. One of the header files is already converted to show how it works as an example. You will complete a subclass for each source header file that performs the serialization and passes the associated test data file. No specific development environment is required, any relatively modern c++ compiler will work as long as it can compile RapidJson ([login to view URL]). The following is an example of what a simple translation would look like: //--------------------------------------------------------------------------- typedef struct { unsigned short id; char name[15]; unsigned short data1; unsigned short data2; unsigned short data3; #define options1_value1 0x0001 #define options1_value2 0x0002 unsigned short options1; } example_struct; //--------------------------------------------------------------------------- class TBinaryRecordToJson_Example : public TBinaryRecordToJson { public: virtual bool ToJson(const void *Buffer,int BufferSize,std::string &Json); virtual bool ToBinary(const std::string &Json,void *Buffer,int BufferSize); }; //--------------------------------------------------------------------------- bool TBinaryRecordToJson_Example::ToJson(const void *Buffer,int BufferSize,std::string &Json) { example_struct *R=(example_struct *)Buffer; std::vector<std::string> Options; if (R->options1&options1_value1) Options.push_back("options1_value1"); if (R->options1&options1_value2) Options.push_back("options1_value2"); ResetJson(); JsonAddValue_int("id",R->id); JsonAddValue_string("name",R->name); JsonAddValue_int("data1",R->data1); JsonAddValue_int("data2",R->data2); JsonAddValue_int("data3",R->data3); JsonAddArray_string("options",Options); GetJson(Json); return(true); } //--------------------------------------------------------------------------- bool TBinaryRecordToJson_Example::ToBinary(const std::string &Json,void *Buffer,int BufferSize) { example_struct R; memset(&R,0,sizeof(R)); std::vector<std::string> Options; ParseJson(Json); JsonGetValue_unsigned_short("id",[login to view URL]); JsonGetValue_string("name",[login to view URL],sizeof([login to view URL])); JsonGetValue_unsigned_short("data1",[login to view URL]); JsonGetValue_unsigned_short("data2",[login to view URL]); JsonGetValue_unsigned_short("data3",[login to view URL]); JsonGetArray_string("options",Options); for (std::vector<std::string>::iterator it=[login to view URL](); it!=[login to view URL](); ++it) { if (*it=="options1_value1") [login to view URL]|=options1_value1; else if (*it=="options1_value2") [login to view URL]|=options1_value2; } memcpy(Buffer,&R,sizeof(R)); return(true); }
ID projekta: 19328885

Več o projektu

11 ponudb
Projekt na daljavo
Aktivno pred 5 leti

Želite zaslužiti?

Prednosti oddajanja ponudb na Freelancerju

Nastavite svoj proračun in časovni okvir
Prejmite plačilo za svoje delo
Povzetek predloga
Registracija in oddajanje ponudb sta brezplačna
Dodeljeno:
Avatar uporabnika
Hi there, I have extensive C++ experience, and teach C++ too. Having worked with all sorts of data formats, including JSON, XML etc - for nearly 20 years, this should be a relatively straight-forward task. Let me know if you want me to do this for you. Should take me no more than 3-5 days, at most; probably a bit less than that. Cheers
$350 USD v 5 dneh
5,0 (40 ocen)
6,5
6,5
11 freelancerjev je oddalo ponudbo s povprečno vrednostjo $499 USD za to delo
Avatar uporabnika
Hi there, I have checked the details I have great experience with C Programming, C++ Programming. Please start the chat so we can discuss this job more in detail. Thanks
$555 USD v 10 dneh
5,0 (16 ocen)
6,7
6,7
Avatar uporabnika
hello,how are you. i read your bid carefully. i am c/c++, json expert and have full experience for 10 years. c/c++, json is my top skill and i can give you perfect result. i can provide most quality and high speed. if you want to success, please contact me. Then, I will give you good result to the proposals. hire me.
$500 USD v 10 dneh
5,0 (26 ocen)
6,5
6,5
Avatar uporabnika
hello,how are you. i read your bid carefully. i am c/c++, json expert and have full experience for 10 years. c/c++, json is my top skill and i can give you perfect result. i can provide most quality and high speed. if you want to success, please contact me. Then, I will give you good result to the proposals. hire me.
$500 USD v 10 dneh
4,5 (11 ocen)
5,9
5,9
Avatar uporabnika
Hi Dear client! I have read your requirement and I am very interested in your project. Seems to be an interesting work and good opportunity to show my skills to work with you in future as well. I'm a professional developer with over 10 years, so that I can bring your idea to live and you can reach the goal absolutely with me. I am confident that you will be completely satisfied with the quality, timeliness, and professionalism of my work. I would like to share my valuable experience with you, also hope long term relationship with you. Looking forward to work for you Thanks
$555 USD v 10 dneh
5,0 (6 ocen)
4,7
4,7
Avatar uporabnika
I thought myself a good match and send my resume for your review. It shows my background in the C Programming, C++ Programming developer field closely aligns with what Kiwi is looking for.I can done your project as you want just once try me i know you like my previous work. I hold a degree in Computer Engineering. I minored in Programming with a focus in c,c++, assembly. I believe my level of talent and work ethic would be a boon to any Kiwi project that required an C Programming, C++ Programming developer. I would appreciate a chance to sit down for an interview and show you why I am the best candidate.
$472 USD v 8 dneh
5,0 (7 ocen)
3,7
3,7
Avatar uporabnika
Nice to meet you We are top quality full-stack developers and we are ready to work on this project, we use Version Control Systems, Staging Servers, Team Slack Channel and Task Management Tool Our current rate is 50 usd per hour and service quality is excellent Contact me for an enjoyable and reliable development experience. Thank you.
$555 USD v 5 dneh
5,0 (4 ocen)
3,3
3,3
Avatar uporabnika
hi, sir. I just read about your project. I have experiences with C/C++ I am ready to discuss with you about your project. Reward.
$333 USD v 5 dneh
5,0 (2 ocen)
2,0
2,0
Avatar uporabnika
I will make what you want In just 2 days on time my salary is able to be discussed .Let's co-operate ;
$555 USD v 2 dneh
0,0 (0 ocen)
0,0
0,0
Avatar uporabnika
Hi, there. I saw your project and it is very interesting to me. I think it's very important to verify type of values from structure in this project. It's very simple to me, I'll satisfy you enough. Best regards. Gleb M.
$555 USD v 3 dneh
0,0 (0 ocen)
0,0
0,0

O stranki

Zastava UNITED STATES
Clackamas, United States
0,0
0
Plačilna metoda je verificirana
Član(ica) od nov. 17, 2011

Verifikacija stranke

Hvala! Po e-pošti smo vam poslali povezavo za prevzem brezplačnega dobropisa.
Pri pošiljanju vašega e-sporočila je šlo nekaj narobe. Poskusite znova.
Registrirani uporabniki Skupaj objavljenih del
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Nalaganje predogleda
Geolociranje je bilo dovoljeno.
Vaša prijavna seja je potekla, zato ste bili odjavljeni. Prosimo, da se znova prijavite.