Implemented ConvertToJson for post model