memesearch
C Programmer Serializes a Struct

C Programmer Serializes a Struct

Download Find similar pictures
Text on the meme
void serialize_struct(struct my_struct *ms) { struct json_object *obj = json_object_new_object(); struct json_object *arr = json_object_new_array(); for (int i=0; i<ms.entries_num; i++) { struct json_object *json_object_new_object(); struct json_object *json_object_new_string(ms.entries[i].name); struct json_object *json_object_new_int(ms.entries[i].age); struct json_object *json_object_new_string(ms.entries[i].marital-status); struct json_object *json_object_new_string(ms.entries[i].data.toJson()); } json_object_object_add(obj, "people", arr); } json.Marshal(ms)
What it means

A programmer manually serializes a C struct into a JSON object, while a bearded “Go” figure simply calls json.Marshal(ms). The joke contrasts verbose, laborious C code with Go’s concise built-in serialization, making it a reaction to overcomplicated programming solutions. EN: A programmer manually serializes a C struct into a JSON object, while a bearded “Go” figure simply calls json.Marshal(ms). The joke contrasts verbose, laborious C code with Go’s concise built-in serialization, making it a reaction to overcomplicated programming solutions.

Objects
Tags
Source
Type
image
Size
800×251 · 53.5 KiB
Mood
sarcastic
Language
en
Added

Similar memes