added a json decoder and encoder for the hp model and the visualization, such that we can now just add json for the model and it will insert it