json_dump_file API returns success even when fclose fails (consider disk full case). API should check the return value of fclose before returning success to its caller. fwrite may not write anything into the file, it simply returns the number of bytes written into the buffer. When disk is full and fclose is called, it results in truncation of the file (resulting in zero sized file). Since, API is returning success, its caller can't take any remedial action on its failure.
json_dump_file API returns success even when fclose fails (consider disk full case). API should check the return value of fclose before returning success to its caller. fwrite may not write anything into the file, it simply returns the number of bytes written into the buffer. When disk is full and fclose is called, it results in truncation of the file (resulting in zero sized file). Since, API is returning success, its caller can't take any remedial action on its failure.

akheron/jansson,Mephistophiles/jansson,AmesianX/jansson,AmesianX/jansson,akheron/jansson,akheron/jansson,markalanj/jansson,bstarynk/jansson,markalanj/jansson,bstarynk/jansson,bstarynk/jansson,markalanj/jansson,Mephistophiles/jansson