checking for success in jansson too, closes #13