You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am working on two programs that communicate with each other using IPC. when I am putting json_object in the IPC buffer, I checked the type as 4(json_type_object). But when I check the object type in receiver side, then I get the type as 0 (json_type_null).
Nope. This does not work at all: shm = jobj; - shm is the address of a chunk of memory which you have to copy data into.
Trying to put a tree of json_object structs with pointers between them into this chunk of memory is very difficult, I wouldn't try it. What you could do is copy the serialized json string into the shm memory chunk and decode it on the other side. But using shm is a whole separate topic.
One way to do this, if you really wanted to, would be to replace the malloc functions with ones that can use a custom memory region instead of the heap, then have a way to only have those enabled during json-c calls. It'd be pretty hacky though.
Hi, I am working on two programs that communicate with each other using IPC. when I am putting json_object in the IPC buffer, I checked the type as 4(json_type_object). But when I check the object type in receiver side, then I get the type as 0 (json_type_null).
First run the server and then run the client in an other terminal tab/window.
is this a problem with libjson-c?
The text was updated successfully, but these errors were encountered: