json parser: fix segfault if JSON is not to be saved
json parser: fix segfault if JSON is not to be saved

aturetta/liblognorm,radu-gheorghe/liblognorm,janmejay/liblognorm,radu-gheorghe/liblognorm,aturetta/liblognorm,aturetta/liblognorm,janmejay/liblognorm