Added the interfaces to the Model to make it easier to transform collections to arrays or json. Updated the toJson method to call toArray. This reduces code, since the previous method used the same map function as toArray but called toJson instead. Also changed the toJson method signature to conform to the interfaces method signature.
Added the interfaces to the Model to make it easier to transform collections to arrays or json. Updated the toJson method to call toArray. This reduces code, since the previous method used the same map function as toArray but called toJson instead. Also changed the toJson method signature to conform to the interfaces method signature.