Releases: nixzhu/Ananda
Releases · nixzhu/Ananda
Version 1.2.0
Overview
- Added parameter
allowingJSON5to 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
Overview
- Changed
pathtype 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
Overview
- Nothing special, release version 1.0.0
- Remove a unused API from
AnandaJSON
AnandaJSON
❌ Removed
public func withValueExtractor(_ valueExtractor: AnandaValueExtractor) -> AnandaJSONVersion 0.12.0
Overview
- New APIs for updating
AnandaValueExtractor.
AnandaValueExtractor
❇️ Added
public func updatingBool(_ bool: @escaping @Sendable (AnandaJSON) -> Bool?) -> Selfpublic func updatingInt(_ int: @escaping @Sendable (AnandaJSON) -> Int?) -> Selfpublic func updatingDouble(_ double: @escaping @Sendable (AnandaJSON) -> Double?) -> Selfpublic func updatingString(_ string: @escaping @Sendable (AnandaJSON) -> String?) -> Selfpublic func updatingDate(_ date: @escaping @Sendable (AnandaJSON) -> Date?) -> Selfpublic func updatingURL(_ url: @escaping @Sendable (AnandaJSON) -> URL?) -> SelfVersion 0.11.0
Overview
- New decoding API for creating an
AnandaModelusing its ownAnandaValueExtractor.
AnandaModel
❇️ Added
public static func decode(from json: AnandaJSON) -> SelfVersion 0.10.1
Update for Swift 6.
Version 0.10.0
AnandaJSON withValueExtractor for parsing.
Version 0.9.5
Use yyjson 0.10.0
Version 0.9.4
Swift 5.8+
Version 0.9.3
Support Linux.