Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Version 1.2.0

Latest

Choose a tag to compare

@nixzhu nixzhu released this 21 Aug 08:22

Overview

  • Added parameter allowingJSON5 to decoding APIs

AnandaModel, [AnandaModel], [String: AnandaModel]

πŸ”€ Modified

// From
public static func decode(
  from jsonData: Data,
  path: [AnandaPathItem] = []
) -> Self { ... }

// To
public static func decode(
  from data: Data,
  path: [AnandaPathItem] = [],
  allowingJSON5: Bool = false
) -> Self { ... }
// From
public static func decode(
  from jsonString: String,
  path: [AnandaPathItem] = [],
  encoding: String.Encoding = .utf8
) -> Self { ... }

// To
public static func decode(
  from string: String,
  path: [AnandaPathItem] = [],
  allowingJSON5: Bool = false,
  encoding: String.Encoding = .utf8
) -> Self { ... }