use SerialiableToJSON protocol