|
|
|
|
@ -7,9 +7,9 @@ |
|
|
|
|
|
|
|
|
|
import Foundation |
|
|
|
|
|
|
|
|
|
class JSON { |
|
|
|
|
public class JSON { |
|
|
|
|
|
|
|
|
|
static var encoder: JSONEncoder = { |
|
|
|
|
public static var encoder: JSONEncoder = { |
|
|
|
|
let encoder = JSONEncoder() |
|
|
|
|
encoder.keyEncodingStrategy = .convertToSnakeCase |
|
|
|
|
#if DEBUG |
|
|
|
|
@ -23,7 +23,7 @@ class JSON { |
|
|
|
|
return encoder |
|
|
|
|
}() |
|
|
|
|
|
|
|
|
|
static var decoder: JSONDecoder = { |
|
|
|
|
public static var decoder: JSONDecoder = { |
|
|
|
|
let decoder = JSONDecoder() |
|
|
|
|
decoder.keyDecodingStrategy = .convertFromSnakeCase |
|
|
|
|
decoder.dateDecodingStrategy = .custom { decoder in |
|
|
|
|
|