Remove unused test
Improve travis-ci file
Fix JSONEncoder. If the json could not be converted, json_encode will return false. So the JSONEncoder should throw an exception.