Skip to content

Releases: nixzhu/Ananda

Version 1.3.0

Choose a tag to compare

@nixzhu nixzhu released this 07 Feb 21:41
  • Updated JJLISO8601DateFormatter dependency.

Version 1.2.0

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

Version 1.1.0

Choose a tag to compare

@nixzhu nixzhu released this 11 Aug 10:48

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

Choose a tag to compare

@nixzhu nixzhu released this 11 Jan 05:13

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

Choose a tag to compare

@nixzhu nixzhu released this 25 Dec 05:19

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

Choose a tag to compare

@nixzhu nixzhu released this 24 Dec 09:37

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

Choose a tag to compare

@nixzhu nixzhu released this 30 Sep 02:10

Update for Swift 6.

Version 0.10.0

Choose a tag to compare

@nixzhu nixzhu released this 19 Aug 02:36

AnandaJSON withValueExtractor for parsing.

Version 0.9.5

Choose a tag to compare

@nixzhu nixzhu released this 12 Jul 13:36

Use yyjson 0.10.0

Version 0.9.4

Choose a tag to compare

@nixzhu nixzhu released this 22 Jun 02:04

Swift 5.8+