Ive been trying to parse JSON which contains multidimensional array of objects. Vapor sends me an error when im trying to post JSON, error description:
[ ERROR ] PostgreSQLError.server.error.array_recv: wrong element type (ErrorMiddleware.swift:26)
Here is the Model:
import FluentPostgreSQL
import Vapor
final class Category: Codable {
var id: Int?
var options: Options
var questions: [[Question]]
init(options: Options, questions: [[Question]]) {
self.options = options
self.questions = questions
}
}
extension Category: Content {}
extension Category: PostgreSQLModel{}
extension Category: Migration{}
extension Category: Parameter {}