Find Jobs
Hire Freelancers

Serialize C header structures to/from json

$250-750 USD

Ακυρώθηκε
Αναρτήθηκε περίπου 5 χρόνια πριν

$250-750 USD

Πληρωμή κατά την παράδοση
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); }
Ταυτότητα εργασίας: 19328885

Σχετικά με την εργασία

11 προτάσεις
Απομακρυσμένη Εργασία
Ενεργός/ή 5 χρόνια πριν

Ψάχνεις τρόπο για να κερδίσεις μερικά χρήματα;

Πλεονεκτήματα πλειοδοσίας στο Freelancer

Καθόρισε τον προϋπολογισμό σου και το χρονοδιάγραμμα
Πληρώσου για τη δουλειά σου
Περίγραψε την πρόταση σου
Η εγγραφή και η πλειοδοσία σε εργασίες είναι δωρεάν
Βραβεύτηκε στον/στην:
Avatar Χρήστη
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 σε 5 ημέρες
5,0 (40 αξιολογήσεις)
6,5
6,5
11 freelancers δίνουν μια μέση προσφορά $499 USD για αυτή τη δουλειά
Avatar Χρήστη
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 σε 10 ημέρες
5,0 (16 αξιολογήσεις)
6,7
6,7
Avatar Χρήστη
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 σε 10 ημέρες
5,0 (26 αξιολογήσεις)
6,5
6,5
Avatar Χρήστη
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 σε 10 ημέρες
4,5 (11 αξιολογήσεις)
5,9
5,9
Avatar Χρήστη
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 σε 10 ημέρες
5,0 (6 αξιολογήσεις)
4,7
4,7
Avatar Χρήστη
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 σε 8 ημέρες
5,0 (7 αξιολογήσεις)
3,7
3,7
Avatar Χρήστη
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 σε 5 ημέρες
5,0 (4 αξιολογήσεις)
3,3
3,3
Avatar Χρήστη
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 σε 5 ημέρες
5,0 (2 αξιολογήσεις)
2,0
2,0
Avatar Χρήστη
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 σε 2 ημέρες
0,0 (0 αξιολογήσεις)
0,0
0,0
Avatar Χρήστη
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 σε 3 ημέρες
0,0 (0 αξιολογήσεις)
0,0
0,0

Σχετικά με τον πελάτη

Σημαία της UNITED STATES
Clackamas, United States
0,0
0
Επαληθευμένη μέθοδος πληρωμής
Μέλος από Νοε 17, 2011

Επαλήθευση Πελάτη

Άλλες δουλειές από αυτόν τον πελάτη

Android tcpip client app
$30-250 USD
Ευχαριστούμε! Σου έχουμε στείλει ένα email με ένα σύνδεσμο για να διεκδικήσεις τη δωρεάν πίστωση σου.
Κάτι πήγε στραβά κατά την προσπάθεια αποστολής του email σου. Παρακαλούμε δοκίμασε ξανά.
Εγγεγραμμένοι Χρήστες Συνολικές Αναρτημένες Δουλειές
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Φόρτωση προεπισκόπησης
Δόθηκε πρόσβαση για Geolocation.
Η σύνδεση σου έχει λήξει και τώρα έχεις αποσυνδεθεί. Παρακαλούμε συνδέσου ξανά.