Implemented toJSON and added tests
travisplexer: pr-454-linux travis ci test