title: Convert JSON to byte array in C
body: <p>I am new to JSON and jansson . I am trying to create a message in JSON using jansson library and send using UDP. Which requires in byte array. Buffer and length of message in bytes. I tried with json_object_size(). But it returns only number of elements in object.Please suggest me a way forward.</p>
  
  <pre><code>json_t *messagebody = json_object();
  json_object_set_new(messagebody, "request_id", request_id);
  json_object_set_new(messagebody, "process_id",  json_string(process_id)); 
  json_object_set_new(messagebody, "process_server_id", json_string(process_server_id));  
  json_object_set_new(messagebody, "ip_address", json_string(my_ip_address));
  json_object_set_new(messagebody, "action", action);
  </code></pre>