Modified bayesian writer interface
Created a json bayesian writer