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

Skip to content

Releases: nixzhu/Ananda

Version 1.2.0

21 Aug 08:22

Choose a tag to compare

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 { ... }

Version 1.1.0

11 Aug 10:48

Choose a tag to compare

Overview

  • Changed path type from [String] to [AnandaPathItem]
  • Added Dictionary decoding API

Dictionary

❇️ Added

extension Dictionary where Key == String, Value: AnandaModel {
    public static func decode(
        from jsonData: Data,
        path: [AnandaPathItem] = []
    ) -> Self { ... }
    
    public static func decode(
        from jsonString: String,
        path: [AnandaPathItem] = [],
        encoding: String.Encoding = .utf8
    ) -> Self { ... }
}

Version 1.0.0

11 Jan 05:13

Choose a tag to compare

Overview

  • Nothing special, release version 1.0.0
  • Remove a unused API from AnandaJSON

AnandaJSON

❌ Removed

public func withValueExtractor(_ valueExtractor: AnandaValueExtractor) -> AnandaJSON

Version 0.12.0

25 Dec 05:19

Choose a tag to compare

Overview

  • New APIs for updating AnandaValueExtractor.

AnandaValueExtractor

❇️ Added

public func updatingBool(_ bool: @escaping @Sendable (AnandaJSON) -> Bool?) -> Self
public func updatingInt(_ int: @escaping @Sendable (AnandaJSON) -> Int?) -> Self
public func updatingDouble(_ double: @escaping @Sendable (AnandaJSON) -> Double?) -> Self
public func updatingString(_ string: @escaping @Sendable (AnandaJSON) -> String?) -> Self
public func updatingDate(_ date: @escaping @Sendable (AnandaJSON) -> Date?) -> Self
public func updatingURL(_ url: @escaping @Sendable (AnandaJSON) -> URL?) -> Self

Version 0.11.0

24 Dec 09:37

Choose a tag to compare

Overview

  • New decoding API for creating an AnandaModel using its own AnandaValueExtractor .

AnandaModel

❇️ Added

public static func decode(from json: AnandaJSON) -> Self

Version 0.10.1

30 Sep 02:10

Choose a tag to compare

Update for Swift 6.

Version 0.10.0

19 Aug 02:36

Choose a tag to compare

AnandaJSON withValueExtractor for parsing.

Version 0.9.5

12 Jul 13:36

Choose a tag to compare

Use yyjson 0.10.0

Version 0.9.4

22 Jun 02:04

Choose a tag to compare

Swift 5.8+

Version 0.9.3

21 Jun 02:14

Choose a tag to compare

Support Linux.