Skip to content

Instantly share code, notes, and snippets.

View PatrykKaczmarek's full-sized avatar

Patryk Kaczmarek PatrykKaczmarek

View GitHub Profile
@PatrykKaczmarek
PatrykKaczmarek / TestBundleJSONDecoder.swift
Created September 12, 2023 09:56
An easy way to store test data in the json files, read them, change them on the fly and use as a Dictionary or Decodable model.
import XCTest
/// JSON supports two widely used (amongst programming languages) data structures.
/// This protocol is to define them.
protocol JSONStructure {
associatedtype Container: Any
static var container: Container { get }
}
/// **A collection of name/value pairs**.