Update ToJSON helper use accessors if they exist.

Since ToJSON uses the the column name as the accessor method for getting the json data, it died trying to access an invalid method if an accessor was defined.