All Downloads are FREE. Search and download functionalities are using the official Maven repository.

swift4.JSONEncodingHelper.mustache Maven / Gradle / Ivy

There is a newer version: 3.0.0-rc1
Show newest version
//
// JSONEncodingHelper.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//

import Foundation
import Alamofire

open class JSONEncodingHelper {

    open class func encodingParameters(forEncodableObject encodableObj: T?) -> Parameters? {
        var params: Parameters? = nil

        // Encode the Encodable object
        if let encodableObj = encodableObj {
            let encodeResult = CodableHelper.encode(encodableObj, prettyPrint: true)
            if encodeResult.error == nil {
                params = JSONDataEncoding.encodingParameters(jsonData: encodeResult.data)
            }
        }

        return params
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy