Skip to content

JSONFoundation 1.2.0

Choose a tag to compare

@odrobnik odrobnik released this 24 Jun 18:31

JSONValue ergonomics: subscripts and value builders.

Adds convenience helpers to the value layer (folded in from SwiftAgents so every consumer shares them):

  • subscript(key:) / subscript(index:) to read from objects / arrays
  • init(_:) builders from [String: Any] / [Any]
  • a best-effort, non-throwing init(_ value: any Encodable) (asserts on failure; the throwing init(encoding:) remains for callers that need to handle errors)
  • [String: JSONValue].init(jsonObject:)

Full Changelog: 1.1.0...1.2.0