fixed toJson method for updating record with link and datetime objects