add toJSON and from JSON to svm classifiers