Implement fromJson for offline data and fix the date to/from json issue.