MDLocalizedString

public struct MDLocalizedString
extension MDLocalizedString: Decodable
extension MDLocalizedString: Encodable

Structure representing a string in a given language returned by MangaDex

  • The available translated strings

    Declaration

    Swift

    public let translations: [Locale : String]
  • Custom init implementation to flatten the JSON and convert it to meaningful parameters

    Declaration

    Swift

    public init(from decoder: Decoder) throws
  • Custom encode implementation to convert our attributes to the ones expected by the MangaDex API

    Declaration

    Swift

    public func encode(to encoder: Encoder) throws