Đã hoàn thành

C++ program to convert a struct{} into json data

I want a c++ program that converts the following structure to a JSON object and then stringifies that object.

The end result is an std::string that contains all the data under a JSON string format.

Requirements:

The program must compile under Linux and Windows

I would like a single header JSON library to be used...no DLL and no .libs to manage

The program must std::cout the exact same string as the string given at STEP#3 below.

Files to return:

All the source code files that makes the compilation of the program possible.

--------STEP#1:STARTING DATA---------

struct {

bool out_inputs_activated[8] = { false,false,false,false,false,false,false,false };

bool out_outputs_activated[8] = { true,true,true,true,true,true,true,true };

bool in_outputForces_activated[8] = { true,false,true,false,true,false,true,false };

int out_inspectionResult = 75;

int out_movingTrendResults[10] = { 1,5,7,4,55,3,44,65,11,22 };

std::pair<int, int> out_barChartData[3] = { std::make_pair(10,14), std::make_pair(20,34), std::make_pair(30,44) };

};

--------STEP#2:DATA TRANSFORMED IN A JSON STRUCTURE---------

JSON structure :

{

"io_states": {

"digital_inputs": [

false,

false,

false,

false,

false,

false,

false,

false

],

"digital_outputs": [

true,

true,

true,

true,

true,

true,

true,

true

]

},

"system_state": [

"running"

],

"inspection": {

"result_value": 75,

"result_reject_decision": false

},

"statistics": {

"trend_values": [

12,

54,

78,

45,

23,

56,

75,

13,

31

],

"bar_chart": [

[

0,

23

],

[

10,

76

],

[

90,

8

]

]

}

}

--------STEP#3:JSON OBJECT TRANSFORMED TO A STRING---------

Stringified JSON:

{"io_states":{"digital_inputs":[false,false,false,false,false,false,false,false],"digital_outputs":[true,true,true,true,true,true,true,true]},"system_state":["running"],"inspection":{"result_value":75,"result_reject_decision":false},"statistics":{"trend_values":[12,54,78,45,23,56,75,13,31],"bar_chart":[[0,23],[10,76],[90,8]]}}

Kĩ năng: Lập trình C++, Lập trình C, Kiến trúc phần mềm

Xem nhiều hơn: adding json data jquery select box, ocr program convert bmp text, program convert asp coldfusion, nlohmann/json get, simple json parser c++, json library, json parse, convert struct to json c, json array c++ example, json to c++ class generator, how do you convert a c struct to json using the json-c library?, program convert pdf flash, program convert access program exe program, program convert java jar, convert struct size, freeware program convert odp ppt, send data gps server java source code, data mining association rule source code, data mining project javajsp source code, bluetooth data sharing android application source code

Về Bên Thuê:
( 5 nhận xét ) Saint-Augustin-de-Desmaures, Canada

ID dự án: #26379120

Được trao cho:

Anton95lev

Dear sir I have a lot of experiences in c/c++. I'm an expert in c/c++, algorithm and its data structure, windows app, data processing. I'm sure i can make a good result for you in a short time. Thanks, sir Waiting for Thêm

$20 CAD trong 1 ngày
(1 Nhận xét)
0.7

10 freelancer đang chào giá trung bình $36 cho công việc này

NovaSofts

Hello Sir/ Ma’am We are a group of Software Engineers (Programmers) having 10+ years of experience. Expert in JAVA, C, C++ , C# , Python, ANDROID,IOS, MATLAB, IONIC. Done 700+ projects here on FREELANCER.COM. The Thêm

$20 CAD trong 1 ngày
(358 Nhận xét)
7.6
hbxfnzwpf

I am very proficient in c and c++. I have 18 years c++ developing experience now, and have worked for more than 10 years. My work is online game developing, and mainly focus on server side, using c++ under Linux enviro Thêm

$140 CAD trong 3 ngày
(187 Nhận xét)
7.2
zeshan7929

Hi there, I see all three points and understand your requirements, I am ready to convert struct to json, Please message me to start. Thanks

$30 CAD trong 1 ngày
(33 Nhận xét)
5.1
olgastolyarovare

Hello, sir. I'm pretty happy to bid on this interesting project. I read your description carefully and I think that I am the developer you are looking for and are suitable for this task. I can convert a struct{} into j Thêm

$30 CAD trong 1 ngày
(30 Nhận xét)
4.5
Absar631

Hi There, I've reviewed your requirements.I have 4 years experince in c/C++ Python/java/php. Client's idea + Programmer's good coding is the perfect result. As shown on my profile, I have a lot of experience. Please le Thêm

$20 CAD trong 1 ngày
(18 Nhận xét)
4.2
naja0926

Hello. I have 7+ years of C++/C#/Java experience. Now I am in codechef contest, and you can check my rank. And I took part in programming contest and had been awarded good results. I can finish all QT and desktop appli Thêm

$30 CAD trong 1 ngày
(5 Nhận xét)
2.5
hk395a

Hello, I just saw your offer. I believe that I have adequate knowledge and experience to build an exclusive c++ application. With me you'll gain guaranteed quality work for your application. I have immense experience i Thêm

$25 CAD trong 1 ngày
(1 Nhận xét)
0.0
sbassov

Dear sir. I have already read the project description and have confidence to complete the project to a high level within the deadline. I am professional 7+ years experienced developers with C++, C#, Java expertise . I Thêm

$30 CAD trong 1 ngày
(0 Nhận xét)
0.0
ShahrearBinAmin

Dear, I can convert your structure to a JSON object and then stringifies that object both compiled for Linux and windows. I've 3+ years of experience in Android Development and published several apps in the play stor Thêm

$15 CAD trong 1 ngày
(0 Nhận xét)
0.0