Test case
1 generated file · +2 −2test/inputs/graphql/github1.graphql
Mgraphql-swiftdefault / quicktype.swift+2 −2
| @@ -191,7 +191,7 @@ extension Error { | ||
| 191 | 191 | |
| 192 | 192 | // MARK: - Helper functions for creating encoders and decoders |
| 193 | 193 | |
| 194 | -func newJSONDecoder() -> JSONDecoder { | |
| 194 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 195 | 195 | let decoder = JSONDecoder() |
| 196 | 196 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 197 | 197 | let container = try decoder.singleValueContainer() |
| @@ -214,7 +214,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 214 | 214 | return decoder |
| 215 | 215 | } |
| 216 | 216 | |
| 217 | -func newJSONEncoder() -> JSONEncoder { | |
| 217 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 218 | 218 | let encoder = JSONEncoder() |
| 219 | 219 | let formatter = DateFormatter() |
| 220 | 220 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/graphql/github2.graphql
Mgraphql-swiftdefault / quicktype.swift+2 −2
| @@ -283,7 +283,7 @@ extension Error { | ||
| 283 | 283 | |
| 284 | 284 | // MARK: - Helper functions for creating encoders and decoders |
| 285 | 285 | |
| 286 | -func newJSONDecoder() -> JSONDecoder { | |
| 286 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 287 | 287 | let decoder = JSONDecoder() |
| 288 | 288 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 289 | 289 | let container = try decoder.singleValueContainer() |
| @@ -306,7 +306,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 306 | 306 | return decoder |
| 307 | 307 | } |
| 308 | 308 | |
| 309 | -func newJSONEncoder() -> JSONEncoder { | |
| 309 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 310 | 310 | let encoder = JSONEncoder() |
| 311 | 311 | let formatter = DateFormatter() |
| 312 | 312 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/graphql/github3.graphql
Mgraphql-swiftdefault / quicktype.swift+2 −2
| @@ -329,7 +329,7 @@ extension Error { | ||
| 329 | 329 | |
| 330 | 330 | // MARK: - Helper functions for creating encoders and decoders |
| 331 | 331 | |
| 332 | -func newJSONDecoder() -> JSONDecoder { | |
| 332 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 333 | 333 | let decoder = JSONDecoder() |
| 334 | 334 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 335 | 335 | let container = try decoder.singleValueContainer() |
| @@ -352,7 +352,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 352 | 352 | return decoder |
| 353 | 353 | } |
| 354 | 354 | |
| 355 | -func newJSONEncoder() -> JSONEncoder { | |
| 355 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 356 | 356 | let encoder = JSONEncoder() |
| 357 | 357 | let formatter = DateFormatter() |
| 358 | 358 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/graphql/github4.graphql
Mgraphql-swiftdefault / quicktype.swift+2 −2
| @@ -333,7 +333,7 @@ extension Error { | ||
| 333 | 333 | |
| 334 | 334 | // MARK: - Helper functions for creating encoders and decoders |
| 335 | 335 | |
| 336 | -func newJSONDecoder() -> JSONDecoder { | |
| 336 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 337 | 337 | let decoder = JSONDecoder() |
| 338 | 338 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 339 | 339 | let container = try decoder.singleValueContainer() |
| @@ -356,7 +356,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 356 | 356 | return decoder |
| 357 | 357 | } |
| 358 | 358 | |
| 359 | -func newJSONEncoder() -> JSONEncoder { | |
| 359 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 360 | 360 | let encoder = JSONEncoder() |
| 361 | 361 | let formatter = DateFormatter() |
| 362 | 362 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/graphql/github5.graphql
Mgraphql-swiftdefault / quicktype.swift+2 −2
| @@ -191,7 +191,7 @@ extension Error { | ||
| 191 | 191 | |
| 192 | 192 | // MARK: - Helper functions for creating encoders and decoders |
| 193 | 193 | |
| 194 | -func newJSONDecoder() -> JSONDecoder { | |
| 194 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 195 | 195 | let decoder = JSONDecoder() |
| 196 | 196 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 197 | 197 | let container = try decoder.singleValueContainer() |
| @@ -214,7 +214,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 214 | 214 | return decoder |
| 215 | 215 | } |
| 216 | 216 | |
| 217 | -func newJSONEncoder() -> JSONEncoder { | |
| 217 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 218 | 218 | let encoder = JSONEncoder() |
| 219 | 219 | let formatter = DateFormatter() |
| 220 | 220 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/graphql/github6.graphql
Mgraphql-swiftdefault / quicktype.swift+2 −2
| @@ -191,7 +191,7 @@ extension Error { | ||
| 191 | 191 | |
| 192 | 192 | // MARK: - Helper functions for creating encoders and decoders |
| 193 | 193 | |
| 194 | -func newJSONDecoder() -> JSONDecoder { | |
| 194 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 195 | 195 | let decoder = JSONDecoder() |
| 196 | 196 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 197 | 197 | let container = try decoder.singleValueContainer() |
| @@ -214,7 +214,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 214 | 214 | return decoder |
| 215 | 215 | } |
| 216 | 216 | |
| 217 | -func newJSONEncoder() -> JSONEncoder { | |
| 217 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 218 | 218 | let encoder = JSONEncoder() |
| 219 | 219 | let formatter = DateFormatter() |
| 220 | 220 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/graphql/github7.graphql
Mgraphql-swiftdefault / quicktype.swift+2 −2
| @@ -387,7 +387,7 @@ extension Error { | ||
| 387 | 387 | |
| 388 | 388 | // MARK: - Helper functions for creating encoders and decoders |
| 389 | 389 | |
| 390 | -func newJSONDecoder() -> JSONDecoder { | |
| 390 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 391 | 391 | let decoder = JSONDecoder() |
| 392 | 392 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 393 | 393 | let container = try decoder.singleValueContainer() |
| @@ -410,7 +410,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 410 | 410 | return decoder |
| 411 | 411 | } |
| 412 | 412 | |
| 413 | -func newJSONEncoder() -> JSONEncoder { | |
| 413 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 414 | 414 | let encoder = JSONEncoder() |
| 415 | 415 | let formatter = DateFormatter() |
| 416 | 416 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/graphql/github8.graphql
Mgraphql-swiftdefault / quicktype.swift+2 −2
| @@ -252,7 +252,7 @@ extension Error { | ||
| 252 | 252 | |
| 253 | 253 | // MARK: - Helper functions for creating encoders and decoders |
| 254 | 254 | |
| 255 | -func newJSONDecoder() -> JSONDecoder { | |
| 255 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 256 | 256 | let decoder = JSONDecoder() |
| 257 | 257 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 258 | 258 | let container = try decoder.singleValueContainer() |
| @@ -275,7 +275,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 275 | 275 | return decoder |
| 276 | 276 | } |
| 277 | 277 | |
| 278 | -func newJSONEncoder() -> JSONEncoder { | |
| 278 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 279 | 279 | let encoder = JSONEncoder() |
| 280 | 280 | let formatter = DateFormatter() |
| 281 | 281 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/graphql/github9.graphql
Mgraphql-swiftdefault / quicktype.swift+2 −2
| @@ -296,7 +296,7 @@ extension Error { | ||
| 296 | 296 | |
| 297 | 297 | // MARK: - Helper functions for creating encoders and decoders |
| 298 | 298 | |
| 299 | -func newJSONDecoder() -> JSONDecoder { | |
| 299 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 300 | 300 | let decoder = JSONDecoder() |
| 301 | 301 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 302 | 302 | let container = try decoder.singleValueContainer() |
| @@ -319,7 +319,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 319 | 319 | return decoder |
| 320 | 320 | } |
| 321 | 321 | |
| 322 | -func newJSONEncoder() -> JSONEncoder { | |
| 322 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 323 | 323 | let encoder = JSONEncoder() |
| 324 | 324 | let formatter = DateFormatter() |
| 325 | 325 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/00c36.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -236,7 +236,7 @@ extension Array where Element == TopLevel.Element { | ||
| 236 | 236 | |
| 237 | 237 | // MARK: - Helper functions for creating encoders and decoders |
| 238 | 238 | |
| 239 | -func newJSONDecoder() -> JSONDecoder { | |
| 239 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 240 | 240 | let decoder = JSONDecoder() |
| 241 | 241 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 242 | 242 | let container = try decoder.singleValueContainer() |
| @@ -259,7 +259,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 259 | 259 | return decoder |
| 260 | 260 | } |
| 261 | 261 | |
| 262 | -func newJSONEncoder() -> JSONEncoder { | |
| 262 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 263 | 263 | let encoder = JSONEncoder() |
| 264 | 264 | let formatter = DateFormatter() |
| 265 | 265 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/00ec5.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -619,7 +619,7 @@ extension Schema { | ||
| 619 | 619 | |
| 620 | 620 | // MARK: - Helper functions for creating encoders and decoders |
| 621 | 621 | |
| 622 | -func newJSONDecoder() -> JSONDecoder { | |
| 622 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 623 | 623 | let decoder = JSONDecoder() |
| 624 | 624 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 625 | 625 | let container = try decoder.singleValueContainer() |
| @@ -642,7 +642,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 642 | 642 | return decoder |
| 643 | 643 | } |
| 644 | 644 | |
| 645 | -func newJSONEncoder() -> JSONEncoder { | |
| 645 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 646 | 646 | let encoder = JSONEncoder() |
| 647 | 647 | let formatter = DateFormatter() |
| 648 | 648 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/010b1.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -102,7 +102,7 @@ extension Array where Element == TopLevel.Element { | ||
| 102 | 102 | |
| 103 | 103 | // MARK: - Helper functions for creating encoders and decoders |
| 104 | 104 | |
| 105 | -func newJSONDecoder() -> JSONDecoder { | |
| 105 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 106 | 106 | let decoder = JSONDecoder() |
| 107 | 107 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 108 | 108 | let container = try decoder.singleValueContainer() |
| @@ -125,7 +125,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 125 | 125 | return decoder |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | -func newJSONEncoder() -> JSONEncoder { | |
| 128 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 129 | 129 | let encoder = JSONEncoder() |
| 130 | 130 | let formatter = DateFormatter() |
| 131 | 131 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/016af.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -99,7 +99,7 @@ extension TotalPopulation { | ||
| 99 | 99 | |
| 100 | 100 | // MARK: - Helper functions for creating encoders and decoders |
| 101 | 101 | |
| 102 | -func newJSONDecoder() -> JSONDecoder { | |
| 102 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 103 | 103 | let decoder = JSONDecoder() |
| 104 | 104 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 105 | 105 | let container = try decoder.singleValueContainer() |
| @@ -122,7 +122,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 122 | 122 | return decoder |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | -func newJSONEncoder() -> JSONEncoder { | |
| 125 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 126 | 126 | let encoder = JSONEncoder() |
| 127 | 127 | let formatter = DateFormatter() |
| 128 | 128 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/033b1.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -59,7 +59,7 @@ extension TopLevel { | ||
| 59 | 59 | |
| 60 | 60 | // MARK: - Helper functions for creating encoders and decoders |
| 61 | 61 | |
| 62 | -func newJSONDecoder() -> JSONDecoder { | |
| 62 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 63 | 63 | let decoder = JSONDecoder() |
| 64 | 64 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 65 | 65 | let container = try decoder.singleValueContainer() |
| @@ -82,7 +82,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 82 | 82 | return decoder |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | -func newJSONEncoder() -> JSONEncoder { | |
| 85 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 86 | 86 | let encoder = JSONEncoder() |
| 87 | 87 | let formatter = DateFormatter() |
| 88 | 88 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/050b0.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -333,7 +333,7 @@ extension Array where Element == TopLevel.Element { | ||
| 333 | 333 | |
| 334 | 334 | // MARK: - Helper functions for creating encoders and decoders |
| 335 | 335 | |
| 336 | -func newJSONDecoder() -> JSONDecoder { | |
| 336 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 337 | 337 | let decoder = JSONDecoder() |
| 338 | 338 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 339 | 339 | let container = try decoder.singleValueContainer() |
| @@ -356,7 +356,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 356 | 356 | return decoder |
| 357 | 357 | } |
| 358 | 358 | |
| 359 | -func newJSONEncoder() -> JSONEncoder { | |
| 359 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 360 | 360 | let encoder = JSONEncoder() |
| 361 | 361 | let formatter = DateFormatter() |
| 362 | 362 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/06bee.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -278,7 +278,7 @@ extension Array where Element == TopLevel.Element { | ||
| 278 | 278 | |
| 279 | 279 | // MARK: - Helper functions for creating encoders and decoders |
| 280 | 280 | |
| 281 | -func newJSONDecoder() -> JSONDecoder { | |
| 281 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 282 | 282 | let decoder = JSONDecoder() |
| 283 | 283 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 284 | 284 | let container = try decoder.singleValueContainer() |
| @@ -301,7 +301,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 301 | 301 | return decoder |
| 302 | 302 | } |
| 303 | 303 | |
| 304 | -func newJSONEncoder() -> JSONEncoder { | |
| 304 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 305 | 305 | let encoder = JSONEncoder() |
| 306 | 306 | let formatter = DateFormatter() |
| 307 | 307 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/07540.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -88,7 +88,7 @@ extension Cookies { | ||
| 88 | 88 | |
| 89 | 89 | // MARK: - Helper functions for creating encoders and decoders |
| 90 | 90 | |
| 91 | -func newJSONDecoder() -> JSONDecoder { | |
| 91 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 92 | 92 | let decoder = JSONDecoder() |
| 93 | 93 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 94 | 94 | let container = try decoder.singleValueContainer() |
| @@ -111,7 +111,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 111 | 111 | return decoder |
| 112 | 112 | } |
| 113 | 113 | |
| 114 | -func newJSONEncoder() -> JSONEncoder { | |
| 114 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 115 | 115 | let encoder = JSONEncoder() |
| 116 | 116 | let formatter = DateFormatter() |
| 117 | 117 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/0779f.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -267,7 +267,7 @@ extension Meta { | ||
| 267 | 267 | |
| 268 | 268 | // MARK: - Helper functions for creating encoders and decoders |
| 269 | 269 | |
| 270 | -func newJSONDecoder() -> JSONDecoder { | |
| 270 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 271 | 271 | let decoder = JSONDecoder() |
| 272 | 272 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 273 | 273 | let container = try decoder.singleValueContainer() |
| @@ -290,7 +290,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 290 | 290 | return decoder |
| 291 | 291 | } |
| 292 | 292 | |
| 293 | -func newJSONEncoder() -> JSONEncoder { | |
| 293 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 294 | 294 | let encoder = JSONEncoder() |
| 295 | 295 | let formatter = DateFormatter() |
| 296 | 296 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/07c75.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -254,7 +254,7 @@ extension Array where Element == TopLevel.Element { | ||
| 254 | 254 | |
| 255 | 255 | // MARK: - Helper functions for creating encoders and decoders |
| 256 | 256 | |
| 257 | -func newJSONDecoder() -> JSONDecoder { | |
| 257 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 258 | 258 | let decoder = JSONDecoder() |
| 259 | 259 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 260 | 260 | let container = try decoder.singleValueContainer() |
| @@ -277,7 +277,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 277 | 277 | return decoder |
| 278 | 278 | } |
| 279 | 279 | |
| 280 | -func newJSONEncoder() -> JSONEncoder { | |
| 280 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 281 | 281 | let encoder = JSONEncoder() |
| 282 | 282 | let formatter = DateFormatter() |
| 283 | 283 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/09f54.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -159,7 +159,7 @@ extension Description { | ||
| 159 | 159 | |
| 160 | 160 | // MARK: - Helper functions for creating encoders and decoders |
| 161 | 161 | |
| 162 | -func newJSONDecoder() -> JSONDecoder { | |
| 162 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 163 | 163 | let decoder = JSONDecoder() |
| 164 | 164 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 165 | 165 | let container = try decoder.singleValueContainer() |
| @@ -182,7 +182,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 182 | 182 | return decoder |
| 183 | 183 | } |
| 184 | 184 | |
| 185 | -func newJSONEncoder() -> JSONEncoder { | |
| 185 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 186 | 186 | let encoder = JSONEncoder() |
| 187 | 187 | let formatter = DateFormatter() |
| 188 | 188 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/0a358.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -176,7 +176,7 @@ extension Result { | ||
| 176 | 176 | |
| 177 | 177 | // MARK: - Helper functions for creating encoders and decoders |
| 178 | 178 | |
| 179 | -func newJSONDecoder() -> JSONDecoder { | |
| 179 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 180 | 180 | let decoder = JSONDecoder() |
| 181 | 181 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 182 | 182 | let container = try decoder.singleValueContainer() |
| @@ -199,7 +199,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 199 | 199 | return decoder |
| 200 | 200 | } |
| 201 | 201 | |
| 202 | -func newJSONEncoder() -> JSONEncoder { | |
| 202 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 203 | 203 | let encoder = JSONEncoder() |
| 204 | 204 | let formatter = DateFormatter() |
| 205 | 205 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/0a91a.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -1238,7 +1238,7 @@ extension Array where Element == TopLevel.Element { | ||
| 1238 | 1238 | |
| 1239 | 1239 | // MARK: - Helper functions for creating encoders and decoders |
| 1240 | 1240 | |
| 1241 | -func newJSONDecoder() -> JSONDecoder { | |
| 1241 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 1242 | 1242 | let decoder = JSONDecoder() |
| 1243 | 1243 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 1244 | 1244 | let container = try decoder.singleValueContainer() |
| @@ -1261,7 +1261,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 1261 | 1261 | return decoder |
| 1262 | 1262 | } |
| 1263 | 1263 | |
| 1264 | -func newJSONEncoder() -> JSONEncoder { | |
| 1264 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 1265 | 1265 | let encoder = JSONEncoder() |
| 1266 | 1266 | let formatter = DateFormatter() |
| 1267 | 1267 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/0b91a.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -351,7 +351,7 @@ extension Component { | ||
| 351 | 351 | |
| 352 | 352 | // MARK: - Helper functions for creating encoders and decoders |
| 353 | 353 | |
| 354 | -func newJSONDecoder() -> JSONDecoder { | |
| 354 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 355 | 355 | let decoder = JSONDecoder() |
| 356 | 356 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 357 | 357 | let container = try decoder.singleValueContainer() |
| @@ -374,7 +374,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 374 | 374 | return decoder |
| 375 | 375 | } |
| 376 | 376 | |
| 377 | -func newJSONEncoder() -> JSONEncoder { | |
| 377 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 378 | 378 | let encoder = JSONEncoder() |
| 379 | 379 | let formatter = DateFormatter() |
| 380 | 380 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/0cffa.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -727,7 +727,7 @@ extension Pagination { | ||
| 727 | 727 | |
| 728 | 728 | // MARK: - Helper functions for creating encoders and decoders |
| 729 | 729 | |
| 730 | -func newJSONDecoder() -> JSONDecoder { | |
| 730 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 731 | 731 | let decoder = JSONDecoder() |
| 732 | 732 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 733 | 733 | let container = try decoder.singleValueContainer() |
| @@ -750,7 +750,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 750 | 750 | return decoder |
| 751 | 751 | } |
| 752 | 752 | |
| 753 | -func newJSONEncoder() -> JSONEncoder { | |
| 753 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 754 | 754 | let encoder = JSONEncoder() |
| 755 | 755 | let formatter = DateFormatter() |
| 756 | 756 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/0e0c2.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -522,7 +522,7 @@ extension VoteScore { | ||
| 522 | 522 | |
| 523 | 523 | // MARK: - Helper functions for creating encoders and decoders |
| 524 | 524 | |
| 525 | -func newJSONDecoder() -> JSONDecoder { | |
| 525 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 526 | 526 | let decoder = JSONDecoder() |
| 527 | 527 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 528 | 528 | let container = try decoder.singleValueContainer() |
| @@ -545,7 +545,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 545 | 545 | return decoder |
| 546 | 546 | } |
| 547 | 547 | |
| 548 | -func newJSONEncoder() -> JSONEncoder { | |
| 548 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 549 | 549 | let encoder = JSONEncoder() |
| 550 | 550 | let formatter = DateFormatter() |
| 551 | 551 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/0fecf.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -51,7 +51,7 @@ extension TopLevel { | ||
| 51 | 51 | |
| 52 | 52 | // MARK: - Helper functions for creating encoders and decoders |
| 53 | 53 | |
| 54 | -func newJSONDecoder() -> JSONDecoder { | |
| 54 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 55 | 55 | let decoder = JSONDecoder() |
| 56 | 56 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 57 | 57 | let container = try decoder.singleValueContainer() |
| @@ -74,7 +74,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 74 | 74 | return decoder |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | -func newJSONEncoder() -> JSONEncoder { | |
| 77 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 78 | 78 | let encoder = JSONEncoder() |
| 79 | 79 | let formatter = DateFormatter() |
| 80 | 80 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/10be4.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -344,7 +344,7 @@ extension Array where Element == TopLevel.Element { | ||
| 344 | 344 | |
| 345 | 345 | // MARK: - Helper functions for creating encoders and decoders |
| 346 | 346 | |
| 347 | -func newJSONDecoder() -> JSONDecoder { | |
| 347 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 348 | 348 | let decoder = JSONDecoder() |
| 349 | 349 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 350 | 350 | let container = try decoder.singleValueContainer() |
| @@ -367,7 +367,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 367 | 367 | return decoder |
| 368 | 368 | } |
| 369 | 369 | |
| 370 | -func newJSONEncoder() -> JSONEncoder { | |
| 370 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 371 | 371 | let encoder = JSONEncoder() |
| 372 | 372 | let formatter = DateFormatter() |
| 373 | 373 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/112b5.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -156,7 +156,7 @@ extension Headers { | ||
| 156 | 156 | |
| 157 | 157 | // MARK: - Helper functions for creating encoders and decoders |
| 158 | 158 | |
| 159 | -func newJSONDecoder() -> JSONDecoder { | |
| 159 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 160 | 160 | let decoder = JSONDecoder() |
| 161 | 161 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 162 | 162 | let container = try decoder.singleValueContainer() |
| @@ -179,7 +179,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 179 | 179 | return decoder |
| 180 | 180 | } |
| 181 | 181 | |
| 182 | -func newJSONEncoder() -> JSONEncoder { | |
| 182 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 183 | 183 | let encoder = JSONEncoder() |
| 184 | 184 | let formatter = DateFormatter() |
| 185 | 185 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/127a1.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -726,7 +726,7 @@ extension Pagination { | ||
| 726 | 726 | |
| 727 | 727 | // MARK: - Helper functions for creating encoders and decoders |
| 728 | 728 | |
| 729 | -func newJSONDecoder() -> JSONDecoder { | |
| 729 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 730 | 730 | let decoder = JSONDecoder() |
| 731 | 731 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 732 | 732 | let container = try decoder.singleValueContainer() |
| @@ -749,7 +749,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 749 | 749 | return decoder |
| 750 | 750 | } |
| 751 | 751 | |
| 752 | -func newJSONEncoder() -> JSONEncoder { | |
| 752 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 753 | 753 | let encoder = JSONEncoder() |
| 754 | 754 | let formatter = DateFormatter() |
| 755 | 755 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/13d8d.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -258,7 +258,7 @@ extension Array where Element == TopLevel.Element { | ||
| 258 | 258 | |
| 259 | 259 | // MARK: - Helper functions for creating encoders and decoders |
| 260 | 260 | |
| 261 | -func newJSONDecoder() -> JSONDecoder { | |
| 261 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 262 | 262 | let decoder = JSONDecoder() |
| 263 | 263 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 264 | 264 | let container = try decoder.singleValueContainer() |
| @@ -281,7 +281,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 281 | 281 | return decoder |
| 282 | 282 | } |
| 283 | 283 | |
| 284 | -func newJSONEncoder() -> JSONEncoder { | |
| 284 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 285 | 285 | let encoder = JSONEncoder() |
| 286 | 286 | let formatter = DateFormatter() |
| 287 | 287 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/14d38.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -107,7 +107,7 @@ extension Headers { | ||
| 107 | 107 | |
| 108 | 108 | // MARK: - Helper functions for creating encoders and decoders |
| 109 | 109 | |
| 110 | -func newJSONDecoder() -> JSONDecoder { | |
| 110 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 111 | 111 | let decoder = JSONDecoder() |
| 112 | 112 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 113 | 113 | let container = try decoder.singleValueContainer() |
| @@ -130,7 +130,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 130 | 130 | return decoder |
| 131 | 131 | } |
| 132 | 132 | |
| 133 | -func newJSONEncoder() -> JSONEncoder { | |
| 133 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 134 | 134 | let encoder = JSONEncoder() |
| 135 | 135 | let formatter = DateFormatter() |
| 136 | 136 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/167d6.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -59,7 +59,7 @@ extension TopLevel { | ||
| 59 | 59 | |
| 60 | 60 | // MARK: - Helper functions for creating encoders and decoders |
| 61 | 61 | |
| 62 | -func newJSONDecoder() -> JSONDecoder { | |
| 62 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 63 | 63 | let decoder = JSONDecoder() |
| 64 | 64 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 65 | 65 | let container = try decoder.singleValueContainer() |
| @@ -82,7 +82,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 82 | 82 | return decoder |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | -func newJSONEncoder() -> JSONEncoder { | |
| 85 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 86 | 86 | let encoder = JSONEncoder() |
| 87 | 87 | let formatter = DateFormatter() |
| 88 | 88 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/16bc5.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -807,7 +807,7 @@ extension Wind { | ||
| 807 | 807 | |
| 808 | 808 | // MARK: - Helper functions for creating encoders and decoders |
| 809 | 809 | |
| 810 | -func newJSONDecoder() -> JSONDecoder { | |
| 810 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 811 | 811 | let decoder = JSONDecoder() |
| 812 | 812 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 813 | 813 | let container = try decoder.singleValueContainer() |
| @@ -830,7 +830,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 830 | 830 | return decoder |
| 831 | 831 | } |
| 832 | 832 | |
| 833 | -func newJSONEncoder() -> JSONEncoder { | |
| 833 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 834 | 834 | let encoder = JSONEncoder() |
| 835 | 835 | let formatter = DateFormatter() |
| 836 | 836 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/176f1.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -263,7 +263,7 @@ extension Footnote { | ||
| 263 | 263 | |
| 264 | 264 | // MARK: - Helper functions for creating encoders and decoders |
| 265 | 265 | |
| 266 | -func newJSONDecoder() -> JSONDecoder { | |
| 266 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 267 | 267 | let decoder = JSONDecoder() |
| 268 | 268 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 269 | 269 | let container = try decoder.singleValueContainer() |
| @@ -286,7 +286,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 286 | 286 | return decoder |
| 287 | 287 | } |
| 288 | 288 | |
| 289 | -func newJSONEncoder() -> JSONEncoder { | |
| 289 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 290 | 290 | let encoder = JSONEncoder() |
| 291 | 291 | let formatter = DateFormatter() |
| 292 | 292 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/1a7f5.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -102,7 +102,7 @@ extension Array where Element == TopLevel.Element { | ||
| 102 | 102 | |
| 103 | 103 | // MARK: - Helper functions for creating encoders and decoders |
| 104 | 104 | |
| 105 | -func newJSONDecoder() -> JSONDecoder { | |
| 105 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 106 | 106 | let decoder = JSONDecoder() |
| 107 | 107 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 108 | 108 | let container = try decoder.singleValueContainer() |
| @@ -125,7 +125,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 125 | 125 | return decoder |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | -func newJSONEncoder() -> JSONEncoder { | |
| 128 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 129 | 129 | let encoder = JSONEncoder() |
| 130 | 130 | let formatter = DateFormatter() |
| 131 | 131 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/1b28c.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -99,7 +99,7 @@ extension TotalPopulation { | ||
| 99 | 99 | |
| 100 | 100 | // MARK: - Helper functions for creating encoders and decoders |
| 101 | 101 | |
| 102 | -func newJSONDecoder() -> JSONDecoder { | |
| 102 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 103 | 103 | let decoder = JSONDecoder() |
| 104 | 104 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 105 | 105 | let container = try decoder.singleValueContainer() |
| @@ -122,7 +122,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 122 | 122 | return decoder |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | -func newJSONEncoder() -> JSONEncoder { | |
| 125 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 126 | 126 | let encoder = JSONEncoder() |
| 127 | 127 | let formatter = DateFormatter() |
| 128 | 128 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/1b409.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -441,7 +441,7 @@ enum Title: String, Codable { | ||
| 441 | 441 | |
| 442 | 442 | // MARK: - Helper functions for creating encoders and decoders |
| 443 | 443 | |
| 444 | -func newJSONDecoder() -> JSONDecoder { | |
| 444 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 445 | 445 | let decoder = JSONDecoder() |
| 446 | 446 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 447 | 447 | let container = try decoder.singleValueContainer() |
| @@ -464,7 +464,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 464 | 464 | return decoder |
| 465 | 465 | } |
| 466 | 466 | |
| 467 | -func newJSONEncoder() -> JSONEncoder { | |
| 467 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 468 | 468 | let encoder = JSONEncoder() |
| 469 | 469 | let formatter = DateFormatter() |
| 470 | 470 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/2465e.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -679,7 +679,7 @@ extension Schema { | ||
| 679 | 679 | |
| 680 | 680 | // MARK: - Helper functions for creating encoders and decoders |
| 681 | 681 | |
| 682 | -func newJSONDecoder() -> JSONDecoder { | |
| 682 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 683 | 683 | let decoder = JSONDecoder() |
| 684 | 684 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 685 | 685 | let container = try decoder.singleValueContainer() |
| @@ -702,7 +702,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 702 | 702 | return decoder |
| 703 | 703 | } |
| 704 | 704 | |
| 705 | -func newJSONEncoder() -> JSONEncoder { | |
| 705 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 706 | 706 | let encoder = JSONEncoder() |
| 707 | 707 | let formatter = DateFormatter() |
| 708 | 708 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/24f52.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -267,7 +267,7 @@ extension Meta { | ||
| 267 | 267 | |
| 268 | 268 | // MARK: - Helper functions for creating encoders and decoders |
| 269 | 269 | |
| 270 | -func newJSONDecoder() -> JSONDecoder { | |
| 270 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 271 | 271 | let decoder = JSONDecoder() |
| 272 | 272 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 273 | 273 | let container = try decoder.singleValueContainer() |
| @@ -290,7 +290,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 290 | 290 | return decoder |
| 291 | 291 | } |
| 292 | 292 | |
| 293 | -func newJSONEncoder() -> JSONEncoder { | |
| 293 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 294 | 294 | let encoder = JSONEncoder() |
| 295 | 295 | let formatter = DateFormatter() |
| 296 | 296 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/262f0.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -813,7 +813,7 @@ extension Wind { | ||
| 813 | 813 | |
| 814 | 814 | // MARK: - Helper functions for creating encoders and decoders |
| 815 | 815 | |
| 816 | -func newJSONDecoder() -> JSONDecoder { | |
| 816 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 817 | 817 | let decoder = JSONDecoder() |
| 818 | 818 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 819 | 819 | let container = try decoder.singleValueContainer() |
| @@ -836,7 +836,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 836 | 836 | return decoder |
| 837 | 837 | } |
| 838 | 838 | |
| 839 | -func newJSONEncoder() -> JSONEncoder { | |
| 839 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 840 | 840 | let encoder = JSONEncoder() |
| 841 | 841 | let formatter = DateFormatter() |
| 842 | 842 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/26b49.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -726,7 +726,7 @@ extension Pagination { | ||
| 726 | 726 | |
| 727 | 727 | // MARK: - Helper functions for creating encoders and decoders |
| 728 | 728 | |
| 729 | -func newJSONDecoder() -> JSONDecoder { | |
| 729 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 730 | 730 | let decoder = JSONDecoder() |
| 731 | 731 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 732 | 732 | let container = try decoder.singleValueContainer() |
| @@ -749,7 +749,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 749 | 749 | return decoder |
| 750 | 750 | } |
| 751 | 751 | |
| 752 | -func newJSONEncoder() -> JSONEncoder { | |
| 752 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 753 | 753 | let encoder = JSONEncoder() |
| 754 | 754 | let formatter = DateFormatter() |
| 755 | 755 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/26c9c.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -1470,7 +1470,7 @@ extension Expression { | ||
| 1470 | 1470 | |
| 1471 | 1471 | // MARK: - Helper functions for creating encoders and decoders |
| 1472 | 1472 | |
| 1473 | -func newJSONDecoder() -> JSONDecoder { | |
| 1473 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 1474 | 1474 | let decoder = JSONDecoder() |
| 1475 | 1475 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 1476 | 1476 | let container = try decoder.singleValueContainer() |
| @@ -1493,7 +1493,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 1493 | 1493 | return decoder |
| 1494 | 1494 | } |
| 1495 | 1495 | |
| 1496 | -func newJSONEncoder() -> JSONEncoder { | |
| 1496 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 1497 | 1497 | let encoder = JSONEncoder() |
| 1498 | 1498 | let formatter = DateFormatter() |
| 1499 | 1499 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/27332.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -872,7 +872,7 @@ enum Kind: String, Codable { | ||
| 872 | 872 | |
| 873 | 873 | // MARK: - Helper functions for creating encoders and decoders |
| 874 | 874 | |
| 875 | -func newJSONDecoder() -> JSONDecoder { | |
| 875 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 876 | 876 | let decoder = JSONDecoder() |
| 877 | 877 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 878 | 878 | let container = try decoder.singleValueContainer() |
| @@ -895,7 +895,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 895 | 895 | return decoder |
| 896 | 896 | } |
| 897 | 897 | |
| 898 | -func newJSONEncoder() -> JSONEncoder { | |
| 898 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 899 | 899 | let encoder = JSONEncoder() |
| 900 | 900 | let formatter = DateFormatter() |
| 901 | 901 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/29f47.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -806,7 +806,7 @@ enum Kind: String, Codable { | ||
| 806 | 806 | |
| 807 | 807 | // MARK: - Helper functions for creating encoders and decoders |
| 808 | 808 | |
| 809 | -func newJSONDecoder() -> JSONDecoder { | |
| 809 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 810 | 810 | let decoder = JSONDecoder() |
| 811 | 811 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 812 | 812 | let container = try decoder.singleValueContainer() |
| @@ -829,7 +829,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 829 | 829 | return decoder |
| 830 | 830 | } |
| 831 | 831 | |
| 832 | -func newJSONEncoder() -> JSONEncoder { | |
| 832 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 833 | 833 | let encoder = JSONEncoder() |
| 834 | 834 | let formatter = DateFormatter() |
| 835 | 835 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/2d4e2.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -467,7 +467,7 @@ enum Title: String, Codable { | ||
| 467 | 467 | |
| 468 | 468 | // MARK: - Helper functions for creating encoders and decoders |
| 469 | 469 | |
| 470 | -func newJSONDecoder() -> JSONDecoder { | |
| 470 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 471 | 471 | let decoder = JSONDecoder() |
| 472 | 472 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 473 | 473 | let container = try decoder.singleValueContainer() |
| @@ -490,7 +490,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 490 | 490 | return decoder |
| 491 | 491 | } |
| 492 | 492 | |
| 493 | -func newJSONEncoder() -> JSONEncoder { | |
| 493 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 494 | 494 | let encoder = JSONEncoder() |
| 495 | 495 | let formatter = DateFormatter() |
| 496 | 496 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/2df80.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -296,7 +296,7 @@ extension Array where Element == TopLevel.Element { | ||
| 296 | 296 | |
| 297 | 297 | // MARK: - Helper functions for creating encoders and decoders |
| 298 | 298 | |
| 299 | -func newJSONDecoder() -> JSONDecoder { | |
| 299 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 300 | 300 | let decoder = JSONDecoder() |
| 301 | 301 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 302 | 302 | let container = try decoder.singleValueContainer() |
| @@ -319,7 +319,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 319 | 319 | return decoder |
| 320 | 320 | } |
| 321 | 321 | |
| 322 | -func newJSONEncoder() -> JSONEncoder { | |
| 322 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 323 | 323 | let encoder = JSONEncoder() |
| 324 | 324 | let formatter = DateFormatter() |
| 325 | 325 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/31189.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -227,7 +227,7 @@ extension Rates { | ||
| 227 | 227 | |
| 228 | 228 | // MARK: - Helper functions for creating encoders and decoders |
| 229 | 229 | |
| 230 | -func newJSONDecoder() -> JSONDecoder { | |
| 230 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 231 | 231 | let decoder = JSONDecoder() |
| 232 | 232 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 233 | 233 | let container = try decoder.singleValueContainer() |
| @@ -250,7 +250,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 250 | 250 | return decoder |
| 251 | 251 | } |
| 252 | 252 | |
| 253 | -func newJSONEncoder() -> JSONEncoder { | |
| 253 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 254 | 254 | let encoder = JSONEncoder() |
| 255 | 255 | let formatter = DateFormatter() |
| 256 | 256 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/32431.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -398,7 +398,7 @@ extension Metadata { | ||
| 398 | 398 | |
| 399 | 399 | // MARK: - Helper functions for creating encoders and decoders |
| 400 | 400 | |
| 401 | -func newJSONDecoder() -> JSONDecoder { | |
| 401 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 402 | 402 | let decoder = JSONDecoder() |
| 403 | 403 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 404 | 404 | let container = try decoder.singleValueContainer() |
| @@ -421,7 +421,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 421 | 421 | return decoder |
| 422 | 422 | } |
| 423 | 423 | |
| 424 | -func newJSONEncoder() -> JSONEncoder { | |
| 424 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 425 | 425 | let encoder = JSONEncoder() |
| 426 | 426 | let formatter = DateFormatter() |
| 427 | 427 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/32d5c.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -106,7 +106,7 @@ extension Array where Element == TopLevel.Element { | ||
| 106 | 106 | |
| 107 | 107 | // MARK: - Helper functions for creating encoders and decoders |
| 108 | 108 | |
| 109 | -func newJSONDecoder() -> JSONDecoder { | |
| 109 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 110 | 110 | let decoder = JSONDecoder() |
| 111 | 111 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 112 | 112 | let container = try decoder.singleValueContainer() |
| @@ -129,7 +129,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 129 | 129 | return decoder |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | -func newJSONEncoder() -> JSONEncoder { | |
| 132 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 133 | 133 | let encoder = JSONEncoder() |
| 134 | 134 | let formatter = DateFormatter() |
| 135 | 135 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/337ed.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -368,7 +368,7 @@ enum ResultType: String, Codable { | ||
| 368 | 368 | |
| 369 | 369 | // MARK: - Helper functions for creating encoders and decoders |
| 370 | 370 | |
| 371 | -func newJSONDecoder() -> JSONDecoder { | |
| 371 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 372 | 372 | let decoder = JSONDecoder() |
| 373 | 373 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 374 | 374 | let container = try decoder.singleValueContainer() |
| @@ -391,7 +391,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 391 | 391 | return decoder |
| 392 | 392 | } |
| 393 | 393 | |
| 394 | -func newJSONEncoder() -> JSONEncoder { | |
| 394 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 395 | 395 | let encoder = JSONEncoder() |
| 396 | 396 | let formatter = DateFormatter() |
| 397 | 397 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/33d2e.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -302,7 +302,7 @@ enum Category: String, Codable { | ||
| 302 | 302 | |
| 303 | 303 | // MARK: - Helper functions for creating encoders and decoders |
| 304 | 304 | |
| 305 | -func newJSONDecoder() -> JSONDecoder { | |
| 305 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 306 | 306 | let decoder = JSONDecoder() |
| 307 | 307 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 308 | 308 | let container = try decoder.singleValueContainer() |
| @@ -325,7 +325,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 325 | 325 | return decoder |
| 326 | 326 | } |
| 327 | 327 | |
| 328 | -func newJSONEncoder() -> JSONEncoder { | |
| 328 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 329 | 329 | let encoder = JSONEncoder() |
| 330 | 330 | let formatter = DateFormatter() |
| 331 | 331 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/34702.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -414,7 +414,7 @@ enum FeatureType: String, Codable { | ||
| 414 | 414 | |
| 415 | 415 | // MARK: - Helper functions for creating encoders and decoders |
| 416 | 416 | |
| 417 | -func newJSONDecoder() -> JSONDecoder { | |
| 417 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 418 | 418 | let decoder = JSONDecoder() |
| 419 | 419 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 420 | 420 | let container = try decoder.singleValueContainer() |
| @@ -437,7 +437,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 437 | 437 | return decoder |
| 438 | 438 | } |
| 439 | 439 | |
| 440 | -func newJSONEncoder() -> JSONEncoder { | |
| 440 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 441 | 441 | let encoder = JSONEncoder() |
| 442 | 442 | let formatter = DateFormatter() |
| 443 | 443 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/3536b.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -266,7 +266,7 @@ extension Array where Element == TopLevel.Element { | ||
| 266 | 266 | |
| 267 | 267 | // MARK: - Helper functions for creating encoders and decoders |
| 268 | 268 | |
| 269 | -func newJSONDecoder() -> JSONDecoder { | |
| 269 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 270 | 270 | let decoder = JSONDecoder() |
| 271 | 271 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 272 | 272 | let container = try decoder.singleValueContainer() |
| @@ -289,7 +289,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 289 | 289 | return decoder |
| 290 | 290 | } |
| 291 | 291 | |
| 292 | -func newJSONEncoder() -> JSONEncoder { | |
| 292 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 293 | 293 | let encoder = JSONEncoder() |
| 294 | 294 | let formatter = DateFormatter() |
| 295 | 295 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/3659d.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -99,7 +99,7 @@ extension TotalPopulation { | ||
| 99 | 99 | |
| 100 | 100 | // MARK: - Helper functions for creating encoders and decoders |
| 101 | 101 | |
| 102 | -func newJSONDecoder() -> JSONDecoder { | |
| 102 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 103 | 103 | let decoder = JSONDecoder() |
| 104 | 104 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 105 | 105 | let container = try decoder.singleValueContainer() |
| @@ -122,7 +122,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 122 | 122 | return decoder |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | -func newJSONEncoder() -> JSONEncoder { | |
| 125 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 126 | 126 | let encoder = JSONEncoder() |
| 127 | 127 | let formatter = DateFormatter() |
| 128 | 128 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/36d5d.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -267,7 +267,7 @@ extension Meta { | ||
| 267 | 267 | |
| 268 | 268 | // MARK: - Helper functions for creating encoders and decoders |
| 269 | 269 | |
| 270 | -func newJSONDecoder() -> JSONDecoder { | |
| 270 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 271 | 271 | let decoder = JSONDecoder() |
| 272 | 272 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 273 | 273 | let container = try decoder.singleValueContainer() |
| @@ -290,7 +290,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 290 | 290 | return decoder |
| 291 | 291 | } |
| 292 | 292 | |
| 293 | -func newJSONEncoder() -> JSONEncoder { | |
| 293 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 294 | 294 | let encoder = JSONEncoder() |
| 295 | 295 | let formatter = DateFormatter() |
| 296 | 296 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/3a6b3.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -267,7 +267,7 @@ extension Meta { | ||
| 267 | 267 | |
| 268 | 268 | // MARK: - Helper functions for creating encoders and decoders |
| 269 | 269 | |
| 270 | -func newJSONDecoder() -> JSONDecoder { | |
| 270 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 271 | 271 | let decoder = JSONDecoder() |
| 272 | 272 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 273 | 273 | let container = try decoder.singleValueContainer() |
| @@ -290,7 +290,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 290 | 290 | return decoder |
| 291 | 291 | } |
| 292 | 292 | |
| 293 | -func newJSONEncoder() -> JSONEncoder { | |
| 293 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 294 | 294 | let encoder = JSONEncoder() |
| 295 | 295 | let formatter = DateFormatter() |
| 296 | 296 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/3e9a3.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -263,7 +263,7 @@ extension Footnote { | ||
| 263 | 263 | |
| 264 | 264 | // MARK: - Helper functions for creating encoders and decoders |
| 265 | 265 | |
| 266 | -func newJSONDecoder() -> JSONDecoder { | |
| 266 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 267 | 267 | let decoder = JSONDecoder() |
| 268 | 268 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 269 | 269 | let container = try decoder.singleValueContainer() |
| @@ -286,7 +286,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 286 | 286 | return decoder |
| 287 | 287 | } |
| 288 | 288 | |
| 289 | -func newJSONEncoder() -> JSONEncoder { | |
| 289 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 290 | 290 | let encoder = JSONEncoder() |
| 291 | 291 | let formatter = DateFormatter() |
| 292 | 292 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/3f1ce.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -811,7 +811,7 @@ extension Wind { | ||
| 811 | 811 | |
| 812 | 812 | // MARK: - Helper functions for creating encoders and decoders |
| 813 | 813 | |
| 814 | -func newJSONDecoder() -> JSONDecoder { | |
| 814 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 815 | 815 | let decoder = JSONDecoder() |
| 816 | 816 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 817 | 817 | let container = try decoder.singleValueContainer() |
| @@ -834,7 +834,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 834 | 834 | return decoder |
| 835 | 835 | } |
| 836 | 836 | |
| 837 | -func newJSONEncoder() -> JSONEncoder { | |
| 837 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 838 | 838 | let encoder = JSONEncoder() |
| 839 | 839 | let formatter = DateFormatter() |
| 840 | 840 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/421d4.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -867,7 +867,7 @@ extension Owner { | ||
| 867 | 867 | |
| 868 | 868 | // MARK: - Helper functions for creating encoders and decoders |
| 869 | 869 | |
| 870 | -func newJSONDecoder() -> JSONDecoder { | |
| 870 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 871 | 871 | let decoder = JSONDecoder() |
| 872 | 872 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 873 | 873 | let container = try decoder.singleValueContainer() |
| @@ -890,7 +890,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 890 | 890 | return decoder |
| 891 | 891 | } |
| 892 | 892 | |
| 893 | -func newJSONEncoder() -> JSONEncoder { | |
| 893 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 894 | 894 | let encoder = JSONEncoder() |
| 895 | 895 | let formatter = DateFormatter() |
| 896 | 896 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/437e7.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -714,7 +714,7 @@ extension Pagination { | ||
| 714 | 714 | |
| 715 | 715 | // MARK: - Helper functions for creating encoders and decoders |
| 716 | 716 | |
| 717 | -func newJSONDecoder() -> JSONDecoder { | |
| 717 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 718 | 718 | let decoder = JSONDecoder() |
| 719 | 719 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 720 | 720 | let container = try decoder.singleValueContainer() |
| @@ -737,7 +737,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 737 | 737 | return decoder |
| 738 | 738 | } |
| 739 | 739 | |
| 740 | -func newJSONEncoder() -> JSONEncoder { | |
| 740 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 741 | 741 | let encoder = JSONEncoder() |
| 742 | 742 | let formatter = DateFormatter() |
| 743 | 743 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/43970.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -86,7 +86,7 @@ extension Array where Element == TopLevel.Element { | ||
| 86 | 86 | |
| 87 | 87 | // MARK: - Helper functions for creating encoders and decoders |
| 88 | 88 | |
| 89 | -func newJSONDecoder() -> JSONDecoder { | |
| 89 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 90 | 90 | let decoder = JSONDecoder() |
| 91 | 91 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 92 | 92 | let container = try decoder.singleValueContainer() |
| @@ -109,7 +109,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 109 | 109 | return decoder |
| 110 | 110 | } |
| 111 | 111 | |
| 112 | -func newJSONEncoder() -> JSONEncoder { | |
| 112 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 113 | 113 | let encoder = JSONEncoder() |
| 114 | 114 | let formatter = DateFormatter() |
| 115 | 115 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/43eaf.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -59,7 +59,7 @@ extension TopLevel { | ||
| 59 | 59 | |
| 60 | 60 | // MARK: - Helper functions for creating encoders and decoders |
| 61 | 61 | |
| 62 | -func newJSONDecoder() -> JSONDecoder { | |
| 62 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 63 | 63 | let decoder = JSONDecoder() |
| 64 | 64 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 65 | 65 | let container = try decoder.singleValueContainer() |
| @@ -82,7 +82,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 82 | 82 | return decoder |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | -func newJSONEncoder() -> JSONEncoder { | |
| 85 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 86 | 86 | let encoder = JSONEncoder() |
| 87 | 87 | let formatter = DateFormatter() |
| 88 | 88 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/458db.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -351,7 +351,7 @@ enum Name: String, Codable { | ||
| 351 | 351 | |
| 352 | 352 | // MARK: - Helper functions for creating encoders and decoders |
| 353 | 353 | |
| 354 | -func newJSONDecoder() -> JSONDecoder { | |
| 354 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 355 | 355 | let decoder = JSONDecoder() |
| 356 | 356 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 357 | 357 | let container = try decoder.singleValueContainer() |
| @@ -374,7 +374,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 374 | 374 | return decoder |
| 375 | 375 | } |
| 376 | 376 | |
| 377 | -func newJSONEncoder() -> JSONEncoder { | |
| 377 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 378 | 378 | let encoder = JSONEncoder() |
| 379 | 379 | let formatter = DateFormatter() |
| 380 | 380 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/4961a.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -99,7 +99,7 @@ extension TotalPopulation { | ||
| 99 | 99 | |
| 100 | 100 | // MARK: - Helper functions for creating encoders and decoders |
| 101 | 101 | |
| 102 | -func newJSONDecoder() -> JSONDecoder { | |
| 102 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 103 | 103 | let decoder = JSONDecoder() |
| 104 | 104 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 105 | 105 | let container = try decoder.singleValueContainer() |
| @@ -122,7 +122,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 122 | 122 | return decoder |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | -func newJSONEncoder() -> JSONEncoder { | |
| 125 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 126 | 126 | let encoder = JSONEncoder() |
| 127 | 127 | let formatter = DateFormatter() |
| 128 | 128 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/4a0d7.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -99,7 +99,7 @@ extension TotalPopulation { | ||
| 99 | 99 | |
| 100 | 100 | // MARK: - Helper functions for creating encoders and decoders |
| 101 | 101 | |
| 102 | -func newJSONDecoder() -> JSONDecoder { | |
| 102 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 103 | 103 | let decoder = JSONDecoder() |
| 104 | 104 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 105 | 105 | let container = try decoder.singleValueContainer() |
| @@ -122,7 +122,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 122 | 122 | return decoder |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | -func newJSONEncoder() -> JSONEncoder { | |
| 125 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 126 | 126 | let encoder = JSONEncoder() |
| 127 | 127 | let formatter = DateFormatter() |
| 128 | 128 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/4a455.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -339,7 +339,7 @@ enum FeatureType: String, Codable { | ||
| 339 | 339 | |
| 340 | 340 | // MARK: - Helper functions for creating encoders and decoders |
| 341 | 341 | |
| 342 | -func newJSONDecoder() -> JSONDecoder { | |
| 342 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 343 | 343 | let decoder = JSONDecoder() |
| 344 | 344 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 345 | 345 | let container = try decoder.singleValueContainer() |
| @@ -362,7 +362,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 362 | 362 | return decoder |
| 363 | 363 | } |
| 364 | 364 | |
| 365 | -func newJSONEncoder() -> JSONEncoder { | |
| 365 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 366 | 366 | let encoder = JSONEncoder() |
| 367 | 367 | let formatter = DateFormatter() |
| 368 | 368 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/4c547.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -807,7 +807,7 @@ extension Wind { | ||
| 807 | 807 | |
| 808 | 808 | // MARK: - Helper functions for creating encoders and decoders |
| 809 | 809 | |
| 810 | -func newJSONDecoder() -> JSONDecoder { | |
| 810 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 811 | 811 | let decoder = JSONDecoder() |
| 812 | 812 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 813 | 813 | let container = try decoder.singleValueContainer() |
| @@ -830,7 +830,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 830 | 830 | return decoder |
| 831 | 831 | } |
| 832 | 832 | |
| 833 | -func newJSONEncoder() -> JSONEncoder { | |
| 833 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 834 | 834 | let encoder = JSONEncoder() |
| 835 | 835 | let formatter = DateFormatter() |
| 836 | 836 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/4d6fb.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -869,7 +869,7 @@ enum Kind: String, Codable { | ||
| 869 | 869 | |
| 870 | 870 | // MARK: - Helper functions for creating encoders and decoders |
| 871 | 871 | |
| 872 | -func newJSONDecoder() -> JSONDecoder { | |
| 872 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 873 | 873 | let decoder = JSONDecoder() |
| 874 | 874 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 875 | 875 | let container = try decoder.singleValueContainer() |
| @@ -892,7 +892,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 892 | 892 | return decoder |
| 893 | 893 | } |
| 894 | 894 | |
| 895 | -func newJSONEncoder() -> JSONEncoder { | |
| 895 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 896 | 896 | let encoder = JSONEncoder() |
| 897 | 897 | let formatter = DateFormatter() |
| 898 | 898 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/4e336.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -99,7 +99,7 @@ extension TotalPopulation { | ||
| 99 | 99 | |
| 100 | 100 | // MARK: - Helper functions for creating encoders and decoders |
| 101 | 101 | |
| 102 | -func newJSONDecoder() -> JSONDecoder { | |
| 102 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 103 | 103 | let decoder = JSONDecoder() |
| 104 | 104 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 105 | 105 | let container = try decoder.singleValueContainer() |
| @@ -122,7 +122,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 122 | 122 | return decoder |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | -func newJSONEncoder() -> JSONEncoder { | |
| 125 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 126 | 126 | let encoder = JSONEncoder() |
| 127 | 127 | let formatter = DateFormatter() |
| 128 | 128 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/54147.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -168,7 +168,7 @@ extension Headers { | ||
| 168 | 168 | |
| 169 | 169 | // MARK: - Helper functions for creating encoders and decoders |
| 170 | 170 | |
| 171 | -func newJSONDecoder() -> JSONDecoder { | |
| 171 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 172 | 172 | let decoder = JSONDecoder() |
| 173 | 173 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 174 | 174 | let container = try decoder.singleValueContainer() |
| @@ -191,7 +191,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 191 | 191 | return decoder |
| 192 | 192 | } |
| 193 | 193 | |
| 194 | -func newJSONEncoder() -> JSONEncoder { | |
| 194 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 195 | 195 | let encoder = JSONEncoder() |
| 196 | 196 | let formatter = DateFormatter() |
| 197 | 197 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/54d32.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -181,7 +181,7 @@ enum Status: String, Codable { | ||
| 181 | 181 | |
| 182 | 182 | // MARK: - Helper functions for creating encoders and decoders |
| 183 | 183 | |
| 184 | -func newJSONDecoder() -> JSONDecoder { | |
| 184 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 185 | 185 | let decoder = JSONDecoder() |
| 186 | 186 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 187 | 187 | let container = try decoder.singleValueContainer() |
| @@ -204,7 +204,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 204 | 204 | return decoder |
| 205 | 205 | } |
| 206 | 206 | |
| 207 | -func newJSONEncoder() -> JSONEncoder { | |
| 207 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 208 | 208 | let encoder = JSONEncoder() |
| 209 | 209 | let formatter = DateFormatter() |
| 210 | 210 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/570ec.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -308,7 +308,7 @@ extension Array where Element == TopLevel.Element { | ||
| 308 | 308 | |
| 309 | 309 | // MARK: - Helper functions for creating encoders and decoders |
| 310 | 310 | |
| 311 | -func newJSONDecoder() -> JSONDecoder { | |
| 311 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 312 | 312 | let decoder = JSONDecoder() |
| 313 | 313 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 314 | 314 | let container = try decoder.singleValueContainer() |
| @@ -331,7 +331,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 331 | 331 | return decoder |
| 332 | 332 | } |
| 333 | 333 | |
| 334 | -func newJSONEncoder() -> JSONEncoder { | |
| 334 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 335 | 335 | let encoder = JSONEncoder() |
| 336 | 336 | let formatter = DateFormatter() |
| 337 | 337 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/5dd0d.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -267,7 +267,7 @@ extension Meta { | ||
| 267 | 267 | |
| 268 | 268 | // MARK: - Helper functions for creating encoders and decoders |
| 269 | 269 | |
| 270 | -func newJSONDecoder() -> JSONDecoder { | |
| 270 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 271 | 271 | let decoder = JSONDecoder() |
| 272 | 272 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 273 | 273 | let container = try decoder.singleValueContainer() |
| @@ -290,7 +290,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 290 | 290 | return decoder |
| 291 | 291 | } |
| 292 | 292 | |
| 293 | -func newJSONEncoder() -> JSONEncoder { | |
| 293 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 294 | 294 | let encoder = JSONEncoder() |
| 295 | 295 | let formatter = DateFormatter() |
| 296 | 296 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/5eae5.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -90,7 +90,7 @@ extension Array where Element == TopLevel.Element { | ||
| 90 | 90 | |
| 91 | 91 | // MARK: - Helper functions for creating encoders and decoders |
| 92 | 92 | |
| 93 | -func newJSONDecoder() -> JSONDecoder { | |
| 93 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 94 | 94 | let decoder = JSONDecoder() |
| 95 | 95 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 96 | 96 | let container = try decoder.singleValueContainer() |
| @@ -113,7 +113,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 113 | 113 | return decoder |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | -func newJSONEncoder() -> JSONEncoder { | |
| 116 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 117 | 117 | let encoder = JSONEncoder() |
| 118 | 118 | let formatter = DateFormatter() |
| 119 | 119 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/5eb20.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -267,7 +267,7 @@ extension Meta { | ||
| 267 | 267 | |
| 268 | 268 | // MARK: - Helper functions for creating encoders and decoders |
| 269 | 269 | |
| 270 | -func newJSONDecoder() -> JSONDecoder { | |
| 270 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 271 | 271 | let decoder = JSONDecoder() |
| 272 | 272 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 273 | 273 | let container = try decoder.singleValueContainer() |
| @@ -290,7 +290,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 290 | 290 | return decoder |
| 291 | 291 | } |
| 292 | 292 | |
| 293 | -func newJSONEncoder() -> JSONEncoder { | |
| 293 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 294 | 294 | let encoder = JSONEncoder() |
| 295 | 295 | let formatter = DateFormatter() |
| 296 | 296 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/5f3a1.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -59,7 +59,7 @@ extension TopLevel { | ||
| 59 | 59 | |
| 60 | 60 | // MARK: - Helper functions for creating encoders and decoders |
| 61 | 61 | |
| 62 | -func newJSONDecoder() -> JSONDecoder { | |
| 62 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 63 | 63 | let decoder = JSONDecoder() |
| 64 | 64 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 65 | 65 | let container = try decoder.singleValueContainer() |
| @@ -82,7 +82,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 82 | 82 | return decoder |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | -func newJSONEncoder() -> JSONEncoder { | |
| 85 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 86 | 86 | let encoder = JSONEncoder() |
| 87 | 87 | let formatter = DateFormatter() |
| 88 | 88 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/5f7fe.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -1460,7 +1460,7 @@ extension Expression { | ||
| 1460 | 1460 | |
| 1461 | 1461 | // MARK: - Helper functions for creating encoders and decoders |
| 1462 | 1462 | |
| 1463 | -func newJSONDecoder() -> JSONDecoder { | |
| 1463 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 1464 | 1464 | let decoder = JSONDecoder() |
| 1465 | 1465 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 1466 | 1466 | let container = try decoder.singleValueContainer() |
| @@ -1483,7 +1483,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 1483 | 1483 | return decoder |
| 1484 | 1484 | } |
| 1485 | 1485 | |
| 1486 | -func newJSONEncoder() -> JSONEncoder { | |
| 1486 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 1487 | 1487 | let encoder = JSONEncoder() |
| 1488 | 1488 | let formatter = DateFormatter() |
| 1489 | 1489 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/617e8.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -1456,7 +1456,7 @@ extension Expression { | ||
| 1456 | 1456 | |
| 1457 | 1457 | // MARK: - Helper functions for creating encoders and decoders |
| 1458 | 1458 | |
| 1459 | -func newJSONDecoder() -> JSONDecoder { | |
| 1459 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 1460 | 1460 | let decoder = JSONDecoder() |
| 1461 | 1461 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 1462 | 1462 | let container = try decoder.singleValueContainer() |
| @@ -1479,7 +1479,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 1479 | 1479 | return decoder |
| 1480 | 1480 | } |
| 1481 | 1481 | |
| 1482 | -func newJSONEncoder() -> JSONEncoder { | |
| 1482 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 1483 | 1483 | let encoder = JSONEncoder() |
| 1484 | 1484 | let formatter = DateFormatter() |
| 1485 | 1485 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/61b66.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -267,7 +267,7 @@ extension Meta { | ||
| 267 | 267 | |
| 268 | 268 | // MARK: - Helper functions for creating encoders and decoders |
| 269 | 269 | |
| 270 | -func newJSONDecoder() -> JSONDecoder { | |
| 270 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 271 | 271 | let decoder = JSONDecoder() |
| 272 | 272 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 273 | 273 | let container = try decoder.singleValueContainer() |
| @@ -290,7 +290,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 290 | 290 | return decoder |
| 291 | 291 | } |
| 292 | 292 | |
| 293 | -func newJSONEncoder() -> JSONEncoder { | |
| 293 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 294 | 294 | let encoder = JSONEncoder() |
| 295 | 295 | let formatter = DateFormatter() |
| 296 | 296 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/6260a.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -59,7 +59,7 @@ extension TopLevel { | ||
| 59 | 59 | |
| 60 | 60 | // MARK: - Helper functions for creating encoders and decoders |
| 61 | 61 | |
| 62 | -func newJSONDecoder() -> JSONDecoder { | |
| 62 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 63 | 63 | let decoder = JSONDecoder() |
| 64 | 64 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 65 | 65 | let container = try decoder.singleValueContainer() |
| @@ -82,7 +82,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 82 | 82 | return decoder |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | -func newJSONEncoder() -> JSONEncoder { | |
| 85 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 86 | 86 | let encoder = JSONEncoder() |
| 87 | 87 | let formatter = DateFormatter() |
| 88 | 88 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/65dec.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -381,7 +381,7 @@ enum TypeElement: String, Codable { | ||
| 381 | 381 | |
| 382 | 382 | // MARK: - Helper functions for creating encoders and decoders |
| 383 | 383 | |
| 384 | -func newJSONDecoder() -> JSONDecoder { | |
| 384 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 385 | 385 | let decoder = JSONDecoder() |
| 386 | 386 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 387 | 387 | let container = try decoder.singleValueContainer() |
| @@ -404,7 +404,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 404 | 404 | return decoder |
| 405 | 405 | } |
| 406 | 406 | |
| 407 | -func newJSONEncoder() -> JSONEncoder { | |
| 407 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 408 | 408 | let encoder = JSONEncoder() |
| 409 | 409 | let formatter = DateFormatter() |
| 410 | 410 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/66121.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -278,7 +278,7 @@ extension Array where Element == TopLevel.Element { | ||
| 278 | 278 | |
| 279 | 279 | // MARK: - Helper functions for creating encoders and decoders |
| 280 | 280 | |
| 281 | -func newJSONDecoder() -> JSONDecoder { | |
| 281 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 282 | 282 | let decoder = JSONDecoder() |
| 283 | 283 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 284 | 284 | let container = try decoder.singleValueContainer() |
| @@ -301,7 +301,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 301 | 301 | return decoder |
| 302 | 302 | } |
| 303 | 303 | |
| 304 | -func newJSONEncoder() -> JSONEncoder { | |
| 304 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 305 | 305 | let encoder = JSONEncoder() |
| 306 | 306 | let formatter = DateFormatter() |
| 307 | 307 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/6617c.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -107,7 +107,7 @@ extension IssPosition { | ||
| 107 | 107 | |
| 108 | 108 | // MARK: - Helper functions for creating encoders and decoders |
| 109 | 109 | |
| 110 | -func newJSONDecoder() -> JSONDecoder { | |
| 110 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 111 | 111 | let decoder = JSONDecoder() |
| 112 | 112 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 113 | 113 | let container = try decoder.singleValueContainer() |
| @@ -130,7 +130,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 130 | 130 | return decoder |
| 131 | 131 | } |
| 132 | 132 | |
| 133 | -func newJSONEncoder() -> JSONEncoder { | |
| 133 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 134 | 134 | let encoder = JSONEncoder() |
| 135 | 135 | let formatter = DateFormatter() |
| 136 | 136 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/67c03.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -107,7 +107,7 @@ extension Person { | ||
| 107 | 107 | |
| 108 | 108 | // MARK: - Helper functions for creating encoders and decoders |
| 109 | 109 | |
| 110 | -func newJSONDecoder() -> JSONDecoder { | |
| 110 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 111 | 111 | let decoder = JSONDecoder() |
| 112 | 112 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 113 | 113 | let container = try decoder.singleValueContainer() |
| @@ -130,7 +130,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 130 | 130 | return decoder |
| 131 | 131 | } |
| 132 | 132 | |
| 133 | -func newJSONEncoder() -> JSONEncoder { | |
| 133 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 134 | 134 | let encoder = JSONEncoder() |
| 135 | 135 | let formatter = DateFormatter() |
| 136 | 136 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/68c30.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -259,7 +259,7 @@ extension Out { | ||
| 259 | 259 | |
| 260 | 260 | // MARK: - Helper functions for creating encoders and decoders |
| 261 | 261 | |
| 262 | -func newJSONDecoder() -> JSONDecoder { | |
| 262 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 263 | 263 | let decoder = JSONDecoder() |
| 264 | 264 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 265 | 265 | let container = try decoder.singleValueContainer() |
| @@ -282,7 +282,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 282 | 282 | return decoder |
| 283 | 283 | } |
| 284 | 284 | |
| 285 | -func newJSONEncoder() -> JSONEncoder { | |
| 285 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 286 | 286 | let encoder = JSONEncoder() |
| 287 | 287 | let formatter = DateFormatter() |
| 288 | 288 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/6c155.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -431,7 +431,7 @@ extension Location { | ||
| 431 | 431 | |
| 432 | 432 | // MARK: - Helper functions for creating encoders and decoders |
| 433 | 433 | |
| 434 | -func newJSONDecoder() -> JSONDecoder { | |
| 434 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 435 | 435 | let decoder = JSONDecoder() |
| 436 | 436 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 437 | 437 | let container = try decoder.singleValueContainer() |
| @@ -454,7 +454,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 454 | 454 | return decoder |
| 455 | 455 | } |
| 456 | 456 | |
| 457 | -func newJSONEncoder() -> JSONEncoder { | |
| 457 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 458 | 458 | let encoder = JSONEncoder() |
| 459 | 459 | let formatter = DateFormatter() |
| 460 | 460 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/6de06.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -921,7 +921,7 @@ enum Kind: String, Codable { | ||
| 921 | 921 | |
| 922 | 922 | // MARK: - Helper functions for creating encoders and decoders |
| 923 | 923 | |
| 924 | -func newJSONDecoder() -> JSONDecoder { | |
| 924 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 925 | 925 | let decoder = JSONDecoder() |
| 926 | 926 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 927 | 927 | let container = try decoder.singleValueContainer() |
| @@ -944,7 +944,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 944 | 944 | return decoder |
| 945 | 945 | } |
| 946 | 946 | |
| 947 | -func newJSONEncoder() -> JSONEncoder { | |
| 947 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 948 | 948 | let encoder = JSONEncoder() |
| 949 | 949 | let formatter = DateFormatter() |
| 950 | 950 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/6dec6.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -813,7 +813,7 @@ extension Wind { | ||
| 813 | 813 | |
| 814 | 814 | // MARK: - Helper functions for creating encoders and decoders |
| 815 | 815 | |
| 816 | -func newJSONDecoder() -> JSONDecoder { | |
| 816 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 817 | 817 | let decoder = JSONDecoder() |
| 818 | 818 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 819 | 819 | let container = try decoder.singleValueContainer() |
| @@ -836,7 +836,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 836 | 836 | return decoder |
| 837 | 837 | } |
| 838 | 838 | |
| 839 | -func newJSONEncoder() -> JSONEncoder { | |
| 839 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 840 | 840 | let encoder = JSONEncoder() |
| 841 | 841 | let formatter = DateFormatter() |
| 842 | 842 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/6eb00.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -86,7 +86,7 @@ extension Array where Element == TopLevel.Element { | ||
| 86 | 86 | |
| 87 | 87 | // MARK: - Helper functions for creating encoders and decoders |
| 88 | 88 | |
| 89 | -func newJSONDecoder() -> JSONDecoder { | |
| 89 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 90 | 90 | let decoder = JSONDecoder() |
| 91 | 91 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 92 | 92 | let container = try decoder.singleValueContainer() |
| @@ -109,7 +109,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 109 | 109 | return decoder |
| 110 | 110 | } |
| 111 | 111 | |
| 112 | -func newJSONEncoder() -> JSONEncoder { | |
| 112 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 113 | 113 | let encoder = JSONEncoder() |
| 114 | 114 | let formatter = DateFormatter() |
| 115 | 115 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/70c77.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -59,7 +59,7 @@ extension TopLevel { | ||
| 59 | 59 | |
| 60 | 60 | // MARK: - Helper functions for creating encoders and decoders |
| 61 | 61 | |
| 62 | -func newJSONDecoder() -> JSONDecoder { | |
| 62 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 63 | 63 | let decoder = JSONDecoder() |
| 64 | 64 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 65 | 65 | let container = try decoder.singleValueContainer() |
| @@ -82,7 +82,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 82 | 82 | return decoder |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | -func newJSONEncoder() -> JSONEncoder { | |
| 85 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 86 | 86 | let encoder = JSONEncoder() |
| 87 | 87 | let formatter = DateFormatter() |
| 88 | 88 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/734ad.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -389,7 +389,7 @@ enum Status: String, Codable { | ||
| 389 | 389 | |
| 390 | 390 | // MARK: - Helper functions for creating encoders and decoders |
| 391 | 391 | |
| 392 | -func newJSONDecoder() -> JSONDecoder { | |
| 392 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 393 | 393 | let decoder = JSONDecoder() |
| 394 | 394 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 395 | 395 | let container = try decoder.singleValueContainer() |
| @@ -412,7 +412,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 412 | 412 | return decoder |
| 413 | 413 | } |
| 414 | 414 | |
| 415 | -func newJSONEncoder() -> JSONEncoder { | |
| 415 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 416 | 416 | let encoder = JSONEncoder() |
| 417 | 417 | let formatter = DateFormatter() |
| 418 | 418 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/75912.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -59,7 +59,7 @@ extension TopLevel { | ||
| 59 | 59 | |
| 60 | 60 | // MARK: - Helper functions for creating encoders and decoders |
| 61 | 61 | |
| 62 | -func newJSONDecoder() -> JSONDecoder { | |
| 62 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 63 | 63 | let decoder = JSONDecoder() |
| 64 | 64 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 65 | 65 | let container = try decoder.singleValueContainer() |
| @@ -82,7 +82,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 82 | 82 | return decoder |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | -func newJSONEncoder() -> JSONEncoder { | |
| 85 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 86 | 86 | let encoder = JSONEncoder() |
| 87 | 87 | let formatter = DateFormatter() |
| 88 | 88 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/7681c.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -728,7 +728,7 @@ extension Pagination { | ||
| 728 | 728 | |
| 729 | 729 | // MARK: - Helper functions for creating encoders and decoders |
| 730 | 730 | |
| 731 | -func newJSONDecoder() -> JSONDecoder { | |
| 731 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 732 | 732 | let decoder = JSONDecoder() |
| 733 | 733 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 734 | 734 | let container = try decoder.singleValueContainer() |
| @@ -751,7 +751,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 751 | 751 | return decoder |
| 752 | 752 | } |
| 753 | 753 | |
| 754 | -func newJSONEncoder() -> JSONEncoder { | |
| 754 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 755 | 755 | let encoder = JSONEncoder() |
| 756 | 756 | let formatter = DateFormatter() |
| 757 | 757 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/76ae1.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -1435,7 +1435,7 @@ enum SchemaType: String, Codable { | ||
| 1435 | 1435 | |
| 1436 | 1436 | // MARK: - Helper functions for creating encoders and decoders |
| 1437 | 1437 | |
| 1438 | -func newJSONDecoder() -> JSONDecoder { | |
| 1438 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 1439 | 1439 | let decoder = JSONDecoder() |
| 1440 | 1440 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 1441 | 1441 | let container = try decoder.singleValueContainer() |
| @@ -1458,7 +1458,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 1458 | 1458 | return decoder |
| 1459 | 1459 | } |
| 1460 | 1460 | |
| 1461 | -func newJSONEncoder() -> JSONEncoder { | |
| 1461 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 1462 | 1462 | let encoder = JSONEncoder() |
| 1463 | 1463 | let formatter = DateFormatter() |
| 1464 | 1464 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/77392.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -132,7 +132,7 @@ extension Array where Element == TopLevel.Element { | ||
| 132 | 132 | |
| 133 | 133 | // MARK: - Helper functions for creating encoders and decoders |
| 134 | 134 | |
| 135 | -func newJSONDecoder() -> JSONDecoder { | |
| 135 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 136 | 136 | let decoder = JSONDecoder() |
| 137 | 137 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 138 | 138 | let container = try decoder.singleValueContainer() |
| @@ -155,7 +155,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 155 | 155 | return decoder |
| 156 | 156 | } |
| 157 | 157 | |
| 158 | -func newJSONEncoder() -> JSONEncoder { | |
| 158 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 159 | 159 | let encoder = JSONEncoder() |
| 160 | 160 | let formatter = DateFormatter() |
| 161 | 161 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/7d397.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -671,7 +671,7 @@ extension Items { | ||
| 671 | 671 | |
| 672 | 672 | // MARK: - Helper functions for creating encoders and decoders |
| 673 | 673 | |
| 674 | -func newJSONDecoder() -> JSONDecoder { | |
| 674 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 675 | 675 | let decoder = JSONDecoder() |
| 676 | 676 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 677 | 677 | let container = try decoder.singleValueContainer() |
| @@ -694,7 +694,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 694 | 694 | return decoder |
| 695 | 695 | } |
| 696 | 696 | |
| 697 | -func newJSONEncoder() -> JSONEncoder { | |
| 697 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 698 | 698 | let encoder = JSONEncoder() |
| 699 | 699 | let formatter = DateFormatter() |
| 700 | 700 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/7d722.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -267,7 +267,7 @@ extension Meta { | ||
| 267 | 267 | |
| 268 | 268 | // MARK: - Helper functions for creating encoders and decoders |
| 269 | 269 | |
| 270 | -func newJSONDecoder() -> JSONDecoder { | |
| 270 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 271 | 271 | let decoder = JSONDecoder() |
| 272 | 272 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 273 | 273 | let container = try decoder.singleValueContainer() |
| @@ -290,7 +290,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 290 | 290 | return decoder |
| 291 | 291 | } |
| 292 | 292 | |
| 293 | -func newJSONEncoder() -> JSONEncoder { | |
| 293 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 294 | 294 | let encoder = JSONEncoder() |
| 295 | 295 | let formatter = DateFormatter() |
| 296 | 296 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/7df41.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -119,7 +119,7 @@ extension PC { | ||
| 119 | 119 | |
| 120 | 120 | // MARK: - Helper functions for creating encoders and decoders |
| 121 | 121 | |
| 122 | -func newJSONDecoder() -> JSONDecoder { | |
| 122 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 123 | 123 | let decoder = JSONDecoder() |
| 124 | 124 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 125 | 125 | let container = try decoder.singleValueContainer() |
| @@ -142,7 +142,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 142 | 142 | return decoder |
| 143 | 143 | } |
| 144 | 144 | |
| 145 | -func newJSONEncoder() -> JSONEncoder { | |
| 145 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 146 | 146 | let encoder = JSONEncoder() |
| 147 | 147 | let formatter = DateFormatter() |
| 148 | 148 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/7dfa6.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -99,7 +99,7 @@ extension TotalPopulation { | ||
| 99 | 99 | |
| 100 | 100 | // MARK: - Helper functions for creating encoders and decoders |
| 101 | 101 | |
| 102 | -func newJSONDecoder() -> JSONDecoder { | |
| 102 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 103 | 103 | let decoder = JSONDecoder() |
| 104 | 104 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 105 | 105 | let container = try decoder.singleValueContainer() |
| @@ -122,7 +122,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 122 | 122 | return decoder |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | -func newJSONEncoder() -> JSONEncoder { | |
| 125 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 126 | 126 | let encoder = JSONEncoder() |
| 127 | 127 | let formatter = DateFormatter() |
| 128 | 128 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/7eb30.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -237,7 +237,7 @@ enum Tel: String, Codable { | ||
| 237 | 237 | |
| 238 | 238 | // MARK: - Helper functions for creating encoders and decoders |
| 239 | 239 | |
| 240 | -func newJSONDecoder() -> JSONDecoder { | |
| 240 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 241 | 241 | let decoder = JSONDecoder() |
| 242 | 242 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 243 | 243 | let container = try decoder.singleValueContainer() |
| @@ -260,7 +260,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 260 | 260 | return decoder |
| 261 | 261 | } |
| 262 | 262 | |
| 263 | -func newJSONEncoder() -> JSONEncoder { | |
| 263 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 264 | 264 | let encoder = JSONEncoder() |
| 265 | 265 | let formatter = DateFormatter() |
| 266 | 266 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/7f568.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -206,7 +206,7 @@ extension Array where Element == TopLevel.Element { | ||
| 206 | 206 | |
| 207 | 207 | // MARK: - Helper functions for creating encoders and decoders |
| 208 | 208 | |
| 209 | -func newJSONDecoder() -> JSONDecoder { | |
| 209 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 210 | 210 | let decoder = JSONDecoder() |
| 211 | 211 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 212 | 212 | let container = try decoder.singleValueContainer() |
| @@ -229,7 +229,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 229 | 229 | return decoder |
| 230 | 230 | } |
| 231 | 231 | |
| 232 | -func newJSONEncoder() -> JSONEncoder { | |
| 232 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 233 | 233 | let encoder = JSONEncoder() |
| 234 | 234 | let formatter = DateFormatter() |
| 235 | 235 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/7fbfb.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -236,7 +236,7 @@ extension Array where Element == TopLevel.Element { | ||
| 236 | 236 | |
| 237 | 237 | // MARK: - Helper functions for creating encoders and decoders |
| 238 | 238 | |
| 239 | -func newJSONDecoder() -> JSONDecoder { | |
| 239 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 240 | 240 | let decoder = JSONDecoder() |
| 241 | 241 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 242 | 242 | let container = try decoder.singleValueContainer() |
| @@ -259,7 +259,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 259 | 259 | return decoder |
| 260 | 260 | } |
| 261 | 261 | |
| 262 | -func newJSONEncoder() -> JSONEncoder { | |
| 262 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 263 | 263 | let encoder = JSONEncoder() |
| 264 | 264 | let formatter = DateFormatter() |
| 265 | 265 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/80aff.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -180,7 +180,7 @@ extension Result { | ||
| 180 | 180 | |
| 181 | 181 | // MARK: - Helper functions for creating encoders and decoders |
| 182 | 182 | |
| 183 | -func newJSONDecoder() -> JSONDecoder { | |
| 183 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 184 | 184 | let decoder = JSONDecoder() |
| 185 | 185 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 186 | 186 | let container = try decoder.singleValueContainer() |
| @@ -203,7 +203,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 203 | 203 | return decoder |
| 204 | 204 | } |
| 205 | 205 | |
| 206 | -func newJSONEncoder() -> JSONEncoder { | |
| 206 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 207 | 207 | let encoder = JSONEncoder() |
| 208 | 208 | let formatter = DateFormatter() |
| 209 | 209 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/82509.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -51,7 +51,7 @@ extension TopLevel { | ||
| 51 | 51 | |
| 52 | 52 | // MARK: - Helper functions for creating encoders and decoders |
| 53 | 53 | |
| 54 | -func newJSONDecoder() -> JSONDecoder { | |
| 54 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 55 | 55 | let decoder = JSONDecoder() |
| 56 | 56 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 57 | 57 | let container = try decoder.singleValueContainer() |
| @@ -74,7 +74,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 74 | 74 | return decoder |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | -func newJSONEncoder() -> JSONEncoder { | |
| 77 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 78 | 78 | let encoder = JSONEncoder() |
| 79 | 79 | let formatter = DateFormatter() |
| 80 | 80 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/8592b.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -677,7 +677,7 @@ enum Kind: String, Codable { | ||
| 677 | 677 | |
| 678 | 678 | // MARK: - Helper functions for creating encoders and decoders |
| 679 | 679 | |
| 680 | -func newJSONDecoder() -> JSONDecoder { | |
| 680 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 681 | 681 | let decoder = JSONDecoder() |
| 682 | 682 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 683 | 683 | let container = try decoder.singleValueContainer() |
| @@ -700,7 +700,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 700 | 700 | return decoder |
| 701 | 701 | } |
| 702 | 702 | |
| 703 | -func newJSONEncoder() -> JSONEncoder { | |
| 703 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 704 | 704 | let encoder = JSONEncoder() |
| 705 | 705 | let formatter = DateFormatter() |
| 706 | 706 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/88130.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -807,7 +807,7 @@ extension Wind { | ||
| 807 | 807 | |
| 808 | 808 | // MARK: - Helper functions for creating encoders and decoders |
| 809 | 809 | |
| 810 | -func newJSONDecoder() -> JSONDecoder { | |
| 810 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 811 | 811 | let decoder = JSONDecoder() |
| 812 | 812 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 813 | 813 | let container = try decoder.singleValueContainer() |
| @@ -830,7 +830,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 830 | 830 | return decoder |
| 831 | 831 | } |
| 832 | 832 | |
| 833 | -func newJSONEncoder() -> JSONEncoder { | |
| 833 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 834 | 834 | let encoder = JSONEncoder() |
| 835 | 835 | let formatter = DateFormatter() |
| 836 | 836 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/8a62c.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -99,7 +99,7 @@ extension TotalPopulation { | ||
| 99 | 99 | |
| 100 | 100 | // MARK: - Helper functions for creating encoders and decoders |
| 101 | 101 | |
| 102 | -func newJSONDecoder() -> JSONDecoder { | |
| 102 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 103 | 103 | let decoder = JSONDecoder() |
| 104 | 104 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 105 | 105 | let container = try decoder.singleValueContainer() |
| @@ -122,7 +122,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 122 | 122 | return decoder |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | -func newJSONEncoder() -> JSONEncoder { | |
| 125 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 126 | 126 | let encoder = JSONEncoder() |
| 127 | 127 | let formatter = DateFormatter() |
| 128 | 128 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/908db.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -143,7 +143,7 @@ extension StateState { | ||
| 143 | 143 | |
| 144 | 144 | // MARK: - Helper functions for creating encoders and decoders |
| 145 | 145 | |
| 146 | -func newJSONDecoder() -> JSONDecoder { | |
| 146 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 147 | 147 | let decoder = JSONDecoder() |
| 148 | 148 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 149 | 149 | let container = try decoder.singleValueContainer() |
| @@ -166,7 +166,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 166 | 166 | return decoder |
| 167 | 167 | } |
| 168 | 168 | |
| 169 | -func newJSONEncoder() -> JSONEncoder { | |
| 169 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 170 | 170 | let encoder = JSONEncoder() |
| 171 | 171 | let formatter = DateFormatter() |
| 172 | 172 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/9617f.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -59,7 +59,7 @@ extension TopLevel { | ||
| 59 | 59 | |
| 60 | 60 | // MARK: - Helper functions for creating encoders and decoders |
| 61 | 61 | |
| 62 | -func newJSONDecoder() -> JSONDecoder { | |
| 62 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 63 | 63 | let decoder = JSONDecoder() |
| 64 | 64 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 65 | 65 | let container = try decoder.singleValueContainer() |
| @@ -82,7 +82,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 82 | 82 | return decoder |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | -func newJSONEncoder() -> JSONEncoder { | |
| 85 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 86 | 86 | let encoder = JSONEncoder() |
| 87 | 87 | let formatter = DateFormatter() |
| 88 | 88 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/96f7c.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -71,7 +71,7 @@ extension TopLevel { | ||
| 71 | 71 | |
| 72 | 72 | // MARK: - Helper functions for creating encoders and decoders |
| 73 | 73 | |
| 74 | -func newJSONDecoder() -> JSONDecoder { | |
| 74 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 75 | 75 | let decoder = JSONDecoder() |
| 76 | 76 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 77 | 77 | let container = try decoder.singleValueContainer() |
| @@ -94,7 +94,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 94 | 94 | return decoder |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | -func newJSONEncoder() -> JSONEncoder { | |
| 97 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 98 | 98 | let encoder = JSONEncoder() |
| 99 | 99 | let formatter = DateFormatter() |
| 100 | 100 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/9847b.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -82,7 +82,7 @@ extension Array where Element == TopLevel.Element { | ||
| 82 | 82 | |
| 83 | 83 | // MARK: - Helper functions for creating encoders and decoders |
| 84 | 84 | |
| 85 | -func newJSONDecoder() -> JSONDecoder { | |
| 85 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 86 | 86 | let decoder = JSONDecoder() |
| 87 | 87 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 88 | 88 | let container = try decoder.singleValueContainer() |
| @@ -105,7 +105,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 105 | 105 | return decoder |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | -func newJSONEncoder() -> JSONEncoder { | |
| 108 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 109 | 109 | let encoder = JSONEncoder() |
| 110 | 110 | let formatter = DateFormatter() |
| 111 | 111 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/9929c.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -807,7 +807,7 @@ extension Wind { | ||
| 807 | 807 | |
| 808 | 808 | // MARK: - Helper functions for creating encoders and decoders |
| 809 | 809 | |
| 810 | -func newJSONDecoder() -> JSONDecoder { | |
| 810 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 811 | 811 | let decoder = JSONDecoder() |
| 812 | 812 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 813 | 813 | let container = try decoder.singleValueContainer() |
| @@ -830,7 +830,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 830 | 830 | return decoder |
| 831 | 831 | } |
| 832 | 832 | |
| 833 | -func newJSONEncoder() -> JSONEncoder { | |
| 833 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 834 | 834 | let encoder = JSONEncoder() |
| 835 | 835 | let formatter = DateFormatter() |
| 836 | 836 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/996bd.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -277,7 +277,7 @@ extension Array where Element == TopLevel.Element { | ||
| 277 | 277 | |
| 278 | 278 | // MARK: - Helper functions for creating encoders and decoders |
| 279 | 279 | |
| 280 | -func newJSONDecoder() -> JSONDecoder { | |
| 280 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 281 | 281 | let decoder = JSONDecoder() |
| 282 | 282 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 283 | 283 | let container = try decoder.singleValueContainer() |
| @@ -300,7 +300,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 300 | 300 | return decoder |
| 301 | 301 | } |
| 302 | 302 | |
| 303 | -func newJSONEncoder() -> JSONEncoder { | |
| 303 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 304 | 304 | let encoder = JSONEncoder() |
| 305 | 305 | let formatter = DateFormatter() |
| 306 | 306 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/9a503.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -260,7 +260,7 @@ extension Array where Element == TopLevel.Element { | ||
| 260 | 260 | |
| 261 | 261 | // MARK: - Helper functions for creating encoders and decoders |
| 262 | 262 | |
| 263 | -func newJSONDecoder() -> JSONDecoder { | |
| 263 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 264 | 264 | let decoder = JSONDecoder() |
| 265 | 265 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 266 | 266 | let container = try decoder.singleValueContainer() |
| @@ -283,7 +283,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 283 | 283 | return decoder |
| 284 | 284 | } |
| 285 | 285 | |
| 286 | -func newJSONEncoder() -> JSONEncoder { | |
| 286 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 287 | 287 | let encoder = JSONEncoder() |
| 288 | 288 | let formatter = DateFormatter() |
| 289 | 289 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/9ac3b.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -206,7 +206,7 @@ enum Title: String, Codable { | ||
| 206 | 206 | |
| 207 | 207 | // MARK: - Helper functions for creating encoders and decoders |
| 208 | 208 | |
| 209 | -func newJSONDecoder() -> JSONDecoder { | |
| 209 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 210 | 210 | let decoder = JSONDecoder() |
| 211 | 211 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 212 | 212 | let container = try decoder.singleValueContainer() |
| @@ -229,7 +229,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 229 | 229 | return decoder |
| 230 | 230 | } |
| 231 | 231 | |
| 232 | -func newJSONEncoder() -> JSONEncoder { | |
| 232 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 233 | 233 | let encoder = JSONEncoder() |
| 234 | 234 | let formatter = DateFormatter() |
| 235 | 235 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/9eed5.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -259,7 +259,7 @@ extension Array where Element == TopLevel.Element { | ||
| 259 | 259 | |
| 260 | 260 | // MARK: - Helper functions for creating encoders and decoders |
| 261 | 261 | |
| 262 | -func newJSONDecoder() -> JSONDecoder { | |
| 262 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 263 | 263 | let decoder = JSONDecoder() |
| 264 | 264 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 265 | 265 | let container = try decoder.singleValueContainer() |
| @@ -282,7 +282,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 282 | 282 | return decoder |
| 283 | 283 | } |
| 284 | 284 | |
| 285 | -func newJSONEncoder() -> JSONEncoder { | |
| 285 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 286 | 286 | let encoder = JSONEncoder() |
| 287 | 287 | let formatter = DateFormatter() |
| 288 | 288 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/a0496.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -187,7 +187,7 @@ extension Errors { | ||
| 187 | 187 | |
| 188 | 188 | // MARK: - Helper functions for creating encoders and decoders |
| 189 | 189 | |
| 190 | -func newJSONDecoder() -> JSONDecoder { | |
| 190 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 191 | 191 | let decoder = JSONDecoder() |
| 192 | 192 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 193 | 193 | let container = try decoder.singleValueContainer() |
| @@ -210,7 +210,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 210 | 210 | return decoder |
| 211 | 211 | } |
| 212 | 212 | |
| 213 | -func newJSONEncoder() -> JSONEncoder { | |
| 213 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 214 | 214 | let encoder = JSONEncoder() |
| 215 | 215 | let formatter = DateFormatter() |
| 216 | 216 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/a1eca.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -807,7 +807,7 @@ extension Wind { | ||
| 807 | 807 | |
| 808 | 808 | // MARK: - Helper functions for creating encoders and decoders |
| 809 | 809 | |
| 810 | -func newJSONDecoder() -> JSONDecoder { | |
| 810 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 811 | 811 | let decoder = JSONDecoder() |
| 812 | 812 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 813 | 813 | let container = try decoder.singleValueContainer() |
| @@ -830,7 +830,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 830 | 830 | return decoder |
| 831 | 831 | } |
| 832 | 832 | |
| 833 | -func newJSONEncoder() -> JSONEncoder { | |
| 833 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 834 | 834 | let encoder = JSONEncoder() |
| 835 | 835 | let formatter = DateFormatter() |
| 836 | 836 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/a3d8c.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -861,7 +861,7 @@ extension Owner { | ||
| 861 | 861 | |
| 862 | 862 | // MARK: - Helper functions for creating encoders and decoders |
| 863 | 863 | |
| 864 | -func newJSONDecoder() -> JSONDecoder { | |
| 864 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 865 | 865 | let decoder = JSONDecoder() |
| 866 | 866 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 867 | 867 | let container = try decoder.singleValueContainer() |
| @@ -884,7 +884,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 884 | 884 | return decoder |
| 885 | 885 | } |
| 886 | 886 | |
| 887 | -func newJSONEncoder() -> JSONEncoder { | |
| 887 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 888 | 888 | let encoder = JSONEncoder() |
| 889 | 889 | let formatter = DateFormatter() |
| 890 | 890 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/a45b0.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -102,7 +102,7 @@ extension Array where Element == TopLevel.Element { | ||
| 102 | 102 | |
| 103 | 103 | // MARK: - Helper functions for creating encoders and decoders |
| 104 | 104 | |
| 105 | -func newJSONDecoder() -> JSONDecoder { | |
| 105 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 106 | 106 | let decoder = JSONDecoder() |
| 107 | 107 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 108 | 108 | let container = try decoder.singleValueContainer() |
| @@ -125,7 +125,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 125 | 125 | return decoder |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | -func newJSONEncoder() -> JSONEncoder { | |
| 128 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 129 | 129 | let encoder = JSONEncoder() |
| 130 | 130 | let formatter = DateFormatter() |
| 131 | 131 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/a71df.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -267,7 +267,7 @@ extension Meta { | ||
| 267 | 267 | |
| 268 | 268 | // MARK: - Helper functions for creating encoders and decoders |
| 269 | 269 | |
| 270 | -func newJSONDecoder() -> JSONDecoder { | |
| 270 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 271 | 271 | let decoder = JSONDecoder() |
| 272 | 272 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 273 | 273 | let container = try decoder.singleValueContainer() |
| @@ -290,7 +290,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 290 | 290 | return decoder |
| 291 | 291 | } |
| 292 | 292 | |
| 293 | -func newJSONEncoder() -> JSONEncoder { | |
| 293 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 294 | 294 | let encoder = JSONEncoder() |
| 295 | 295 | let formatter = DateFormatter() |
| 296 | 296 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/a9691.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -59,7 +59,7 @@ extension TopLevel { | ||
| 59 | 59 | |
| 60 | 60 | // MARK: - Helper functions for creating encoders and decoders |
| 61 | 61 | |
| 62 | -func newJSONDecoder() -> JSONDecoder { | |
| 62 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 63 | 63 | let decoder = JSONDecoder() |
| 64 | 64 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 65 | 65 | let container = try decoder.singleValueContainer() |
| @@ -82,7 +82,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 82 | 82 | return decoder |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | -func newJSONEncoder() -> JSONEncoder { | |
| 85 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 86 | 86 | let encoder = JSONEncoder() |
| 87 | 87 | let formatter = DateFormatter() |
| 88 | 88 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/ab0d1.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -102,7 +102,7 @@ extension Array where Element == TopLevel.Element { | ||
| 102 | 102 | |
| 103 | 103 | // MARK: - Helper functions for creating encoders and decoders |
| 104 | 104 | |
| 105 | -func newJSONDecoder() -> JSONDecoder { | |
| 105 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 106 | 106 | let decoder = JSONDecoder() |
| 107 | 107 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 108 | 108 | let container = try decoder.singleValueContainer() |
| @@ -125,7 +125,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 125 | 125 | return decoder |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | -func newJSONEncoder() -> JSONEncoder { | |
| 128 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 129 | 129 | let encoder = JSONEncoder() |
| 130 | 130 | let formatter = DateFormatter() |
| 131 | 131 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/abb4b.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -99,7 +99,7 @@ extension TotalPopulation { | ||
| 99 | 99 | |
| 100 | 100 | // MARK: - Helper functions for creating encoders and decoders |
| 101 | 101 | |
| 102 | -func newJSONDecoder() -> JSONDecoder { | |
| 102 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 103 | 103 | let decoder = JSONDecoder() |
| 104 | 104 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 105 | 105 | let container = try decoder.singleValueContainer() |
| @@ -122,7 +122,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 122 | 122 | return decoder |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | -func newJSONEncoder() -> JSONEncoder { | |
| 125 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 126 | 126 | let encoder = JSONEncoder() |
| 127 | 127 | let formatter = DateFormatter() |
| 128 | 128 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/ac944.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -59,7 +59,7 @@ extension TopLevel { | ||
| 59 | 59 | |
| 60 | 60 | // MARK: - Helper functions for creating encoders and decoders |
| 61 | 61 | |
| 62 | -func newJSONDecoder() -> JSONDecoder { | |
| 62 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 63 | 63 | let decoder = JSONDecoder() |
| 64 | 64 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 65 | 65 | let container = try decoder.singleValueContainer() |
| @@ -82,7 +82,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 82 | 82 | return decoder |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | -func newJSONEncoder() -> JSONEncoder { | |
| 85 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 86 | 86 | let encoder = JSONEncoder() |
| 87 | 87 | let formatter = DateFormatter() |
| 88 | 88 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/ad8be.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -344,7 +344,7 @@ extension Array where Element == TopLevel.Element { | ||
| 344 | 344 | |
| 345 | 345 | // MARK: - Helper functions for creating encoders and decoders |
| 346 | 346 | |
| 347 | -func newJSONDecoder() -> JSONDecoder { | |
| 347 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 348 | 348 | let decoder = JSONDecoder() |
| 349 | 349 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 350 | 350 | let container = try decoder.singleValueContainer() |
| @@ -367,7 +367,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 367 | 367 | return decoder |
| 368 | 368 | } |
| 369 | 369 | |
| 370 | -func newJSONEncoder() -> JSONEncoder { | |
| 370 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 371 | 371 | let encoder = JSONEncoder() |
| 372 | 372 | let formatter = DateFormatter() |
| 373 | 373 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/ae7f0.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -500,7 +500,7 @@ enum Kind: String, Codable { | ||
| 500 | 500 | |
| 501 | 501 | // MARK: - Helper functions for creating encoders and decoders |
| 502 | 502 | |
| 503 | -func newJSONDecoder() -> JSONDecoder { | |
| 503 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 504 | 504 | let decoder = JSONDecoder() |
| 505 | 505 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 506 | 506 | let container = try decoder.singleValueContainer() |
| @@ -523,7 +523,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 523 | 523 | return decoder |
| 524 | 524 | } |
| 525 | 525 | |
| 526 | -func newJSONEncoder() -> JSONEncoder { | |
| 526 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 527 | 527 | let encoder = JSONEncoder() |
| 528 | 528 | let formatter = DateFormatter() |
| 529 | 529 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/ae9ca.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -264,7 +264,7 @@ enum FeatureType: String, Codable { | ||
| 264 | 264 | |
| 265 | 265 | // MARK: - Helper functions for creating encoders and decoders |
| 266 | 266 | |
| 267 | -func newJSONDecoder() -> JSONDecoder { | |
| 267 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 268 | 268 | let decoder = JSONDecoder() |
| 269 | 269 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 270 | 270 | let container = try decoder.singleValueContainer() |
| @@ -287,7 +287,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 287 | 287 | return decoder |
| 288 | 288 | } |
| 289 | 289 | |
| 290 | -func newJSONEncoder() -> JSONEncoder { | |
| 290 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 291 | 291 | let encoder = JSONEncoder() |
| 292 | 292 | let formatter = DateFormatter() |
| 293 | 293 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/af2d1.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -507,7 +507,7 @@ enum FeatureType: String, Codable { | ||
| 507 | 507 | |
| 508 | 508 | // MARK: - Helper functions for creating encoders and decoders |
| 509 | 509 | |
| 510 | -func newJSONDecoder() -> JSONDecoder { | |
| 510 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 511 | 511 | let decoder = JSONDecoder() |
| 512 | 512 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 513 | 513 | let container = try decoder.singleValueContainer() |
| @@ -530,7 +530,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 530 | 530 | return decoder |
| 531 | 531 | } |
| 532 | 532 | |
| 533 | -func newJSONEncoder() -> JSONEncoder { | |
| 533 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 534 | 534 | let encoder = JSONEncoder() |
| 535 | 535 | let formatter = DateFormatter() |
| 536 | 536 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/b4865.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -183,7 +183,7 @@ extension Array where Element == TopLevel.Element { | ||
| 183 | 183 | |
| 184 | 184 | // MARK: - Helper functions for creating encoders and decoders |
| 185 | 185 | |
| 186 | -func newJSONDecoder() -> JSONDecoder { | |
| 186 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 187 | 187 | let decoder = JSONDecoder() |
| 188 | 188 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 189 | 189 | let container = try decoder.singleValueContainer() |
| @@ -206,7 +206,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 206 | 206 | return decoder |
| 207 | 207 | } |
| 208 | 208 | |
| 209 | -func newJSONEncoder() -> JSONEncoder { | |
| 209 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 210 | 210 | let encoder = JSONEncoder() |
| 211 | 211 | let formatter = DateFormatter() |
| 212 | 212 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/b6f2c.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -99,7 +99,7 @@ extension TotalPopulation { | ||
| 99 | 99 | |
| 100 | 100 | // MARK: - Helper functions for creating encoders and decoders |
| 101 | 101 | |
| 102 | -func newJSONDecoder() -> JSONDecoder { | |
| 102 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 103 | 103 | let decoder = JSONDecoder() |
| 104 | 104 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 105 | 105 | let container = try decoder.singleValueContainer() |
| @@ -122,7 +122,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 122 | 122 | return decoder |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | -func newJSONEncoder() -> JSONEncoder { | |
| 125 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 126 | 126 | let encoder = JSONEncoder() |
| 127 | 127 | let formatter = DateFormatter() |
| 128 | 128 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/b6fe5.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -63,7 +63,7 @@ extension TopLevel { | ||
| 63 | 63 | |
| 64 | 64 | // MARK: - Helper functions for creating encoders and decoders |
| 65 | 65 | |
| 66 | -func newJSONDecoder() -> JSONDecoder { | |
| 66 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 67 | 67 | let decoder = JSONDecoder() |
| 68 | 68 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 69 | 69 | let container = try decoder.singleValueContainer() |
| @@ -86,7 +86,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 86 | 86 | return decoder |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | -func newJSONEncoder() -> JSONEncoder { | |
| 89 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 90 | 90 | let encoder = JSONEncoder() |
| 91 | 91 | let formatter = DateFormatter() |
| 92 | 92 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/b9f64.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -51,7 +51,7 @@ extension TopLevel { | ||
| 51 | 51 | |
| 52 | 52 | // MARK: - Helper functions for creating encoders and decoders |
| 53 | 53 | |
| 54 | -func newJSONDecoder() -> JSONDecoder { | |
| 54 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 55 | 55 | let decoder = JSONDecoder() |
| 56 | 56 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 57 | 57 | let container = try decoder.singleValueContainer() |
| @@ -74,7 +74,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 74 | 74 | return decoder |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | -func newJSONEncoder() -> JSONEncoder { | |
| 77 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 78 | 78 | let encoder = JSONEncoder() |
| 79 | 79 | let formatter = DateFormatter() |
| 80 | 80 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/bb1ec.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -99,7 +99,7 @@ extension TotalPopulation { | ||
| 99 | 99 | |
| 100 | 100 | // MARK: - Helper functions for creating encoders and decoders |
| 101 | 101 | |
| 102 | -func newJSONDecoder() -> JSONDecoder { | |
| 102 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 103 | 103 | let decoder = JSONDecoder() |
| 104 | 104 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 105 | 105 | let container = try decoder.singleValueContainer() |
| @@ -122,7 +122,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 122 | 122 | return decoder |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | -func newJSONEncoder() -> JSONEncoder { | |
| 125 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 126 | 126 | let encoder = JSONEncoder() |
| 127 | 127 | let formatter = DateFormatter() |
| 128 | 128 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/be234.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -933,7 +933,7 @@ enum Kind: String, Codable { | ||
| 933 | 933 | |
| 934 | 934 | // MARK: - Helper functions for creating encoders and decoders |
| 935 | 935 | |
| 936 | -func newJSONDecoder() -> JSONDecoder { | |
| 936 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 937 | 937 | let decoder = JSONDecoder() |
| 938 | 938 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 939 | 939 | let container = try decoder.singleValueContainer() |
| @@ -956,7 +956,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 956 | 956 | return decoder |
| 957 | 957 | } |
| 958 | 958 | |
| 959 | -func newJSONEncoder() -> JSONEncoder { | |
| 959 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 960 | 960 | let encoder = JSONEncoder() |
| 961 | 961 | let formatter = DateFormatter() |
| 962 | 962 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/c0356.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -155,7 +155,7 @@ extension Description { | ||
| 155 | 155 | |
| 156 | 156 | // MARK: - Helper functions for creating encoders and decoders |
| 157 | 157 | |
| 158 | -func newJSONDecoder() -> JSONDecoder { | |
| 158 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 159 | 159 | let decoder = JSONDecoder() |
| 160 | 160 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 161 | 161 | let container = try decoder.singleValueContainer() |
| @@ -178,7 +178,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 178 | 178 | return decoder |
| 179 | 179 | } |
| 180 | 180 | |
| 181 | -func newJSONEncoder() -> JSONEncoder { | |
| 181 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 182 | 182 | let encoder = JSONEncoder() |
| 183 | 183 | let formatter = DateFormatter() |
| 184 | 184 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/c0a3a.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -267,7 +267,7 @@ extension Meta { | ||
| 267 | 267 | |
| 268 | 268 | // MARK: - Helper functions for creating encoders and decoders |
| 269 | 269 | |
| 270 | -func newJSONDecoder() -> JSONDecoder { | |
| 270 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 271 | 271 | let decoder = JSONDecoder() |
| 272 | 272 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 273 | 273 | let container = try decoder.singleValueContainer() |
| @@ -290,7 +290,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 290 | 290 | return decoder |
| 291 | 291 | } |
| 292 | 292 | |
| 293 | -func newJSONEncoder() -> JSONEncoder { | |
| 293 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 294 | 294 | let encoder = JSONEncoder() |
| 295 | 295 | let formatter = DateFormatter() |
| 296 | 296 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/c3303.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -722,7 +722,7 @@ extension Pagination { | ||
| 722 | 722 | |
| 723 | 723 | // MARK: - Helper functions for creating encoders and decoders |
| 724 | 724 | |
| 725 | -func newJSONDecoder() -> JSONDecoder { | |
| 725 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 726 | 726 | let decoder = JSONDecoder() |
| 727 | 727 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 728 | 728 | let container = try decoder.singleValueContainer() |
| @@ -745,7 +745,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 745 | 745 | return decoder |
| 746 | 746 | } |
| 747 | 747 | |
| 748 | -func newJSONEncoder() -> JSONEncoder { | |
| 748 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 749 | 749 | let encoder = JSONEncoder() |
| 750 | 750 | let formatter = DateFormatter() |
| 751 | 751 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/c6cfd.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -99,7 +99,7 @@ extension Country { | ||
| 99 | 99 | |
| 100 | 100 | // MARK: - Helper functions for creating encoders and decoders |
| 101 | 101 | |
| 102 | -func newJSONDecoder() -> JSONDecoder { | |
| 102 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 103 | 103 | let decoder = JSONDecoder() |
| 104 | 104 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 105 | 105 | let container = try decoder.singleValueContainer() |
| @@ -122,7 +122,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 122 | 122 | return decoder |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | -func newJSONEncoder() -> JSONEncoder { | |
| 125 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 126 | 126 | let encoder = JSONEncoder() |
| 127 | 127 | let formatter = DateFormatter() |
| 128 | 128 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/c8c7e.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -236,7 +236,7 @@ extension Array where Element == TopLevel.Element { | ||
| 236 | 236 | |
| 237 | 237 | // MARK: - Helper functions for creating encoders and decoders |
| 238 | 238 | |
| 239 | -func newJSONDecoder() -> JSONDecoder { | |
| 239 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 240 | 240 | let decoder = JSONDecoder() |
| 241 | 241 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 242 | 242 | let container = try decoder.singleValueContainer() |
| @@ -259,7 +259,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 259 | 259 | return decoder |
| 260 | 260 | } |
| 261 | 261 | |
| 262 | -func newJSONEncoder() -> JSONEncoder { | |
| 262 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 263 | 263 | let encoder = JSONEncoder() |
| 264 | 264 | let formatter = DateFormatter() |
| 265 | 265 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/cb0cc.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -176,7 +176,7 @@ extension Laureate { | ||
| 176 | 176 | |
| 177 | 177 | // MARK: - Helper functions for creating encoders and decoders |
| 178 | 178 | |
| 179 | -func newJSONDecoder() -> JSONDecoder { | |
| 179 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 180 | 180 | let decoder = JSONDecoder() |
| 181 | 181 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 182 | 182 | let container = try decoder.singleValueContainer() |
| @@ -199,7 +199,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 199 | 199 | return decoder |
| 200 | 200 | } |
| 201 | 201 | |
| 202 | -func newJSONEncoder() -> JSONEncoder { | |
| 202 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 203 | 203 | let encoder = JSONEncoder() |
| 204 | 204 | let formatter = DateFormatter() |
| 205 | 205 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/cb81e.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -111,7 +111,7 @@ extension Description { | ||
| 111 | 111 | |
| 112 | 112 | // MARK: - Helper functions for creating encoders and decoders |
| 113 | 113 | |
| 114 | -func newJSONDecoder() -> JSONDecoder { | |
| 114 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 115 | 115 | let decoder = JSONDecoder() |
| 116 | 116 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 117 | 117 | let container = try decoder.singleValueContainer() |
| @@ -134,7 +134,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 134 | 134 | return decoder |
| 135 | 135 | } |
| 136 | 136 | |
| 137 | -func newJSONEncoder() -> JSONEncoder { | |
| 137 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 138 | 138 | let encoder = JSONEncoder() |
| 139 | 139 | let formatter = DateFormatter() |
| 140 | 140 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/ccd18.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -267,7 +267,7 @@ extension Meta { | ||
| 267 | 267 | |
| 268 | 268 | // MARK: - Helper functions for creating encoders and decoders |
| 269 | 269 | |
| 270 | -func newJSONDecoder() -> JSONDecoder { | |
| 270 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 271 | 271 | let decoder = JSONDecoder() |
| 272 | 272 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 273 | 273 | let container = try decoder.singleValueContainer() |
| @@ -290,7 +290,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 290 | 290 | return decoder |
| 291 | 291 | } |
| 292 | 292 | |
| 293 | -func newJSONEncoder() -> JSONEncoder { | |
| 293 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 294 | 294 | let encoder = JSONEncoder() |
| 295 | 295 | let formatter = DateFormatter() |
| 296 | 296 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/cd238.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -267,7 +267,7 @@ extension Meta { | ||
| 267 | 267 | |
| 268 | 268 | // MARK: - Helper functions for creating encoders and decoders |
| 269 | 269 | |
| 270 | -func newJSONDecoder() -> JSONDecoder { | |
| 270 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 271 | 271 | let decoder = JSONDecoder() |
| 272 | 272 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 273 | 273 | let container = try decoder.singleValueContainer() |
| @@ -290,7 +290,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 290 | 290 | return decoder |
| 291 | 291 | } |
| 292 | 292 | |
| 293 | -func newJSONEncoder() -> JSONEncoder { | |
| 293 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 294 | 294 | let encoder = JSONEncoder() |
| 295 | 295 | let formatter = DateFormatter() |
| 296 | 296 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/cd463.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -59,7 +59,7 @@ extension TopLevel { | ||
| 59 | 59 | |
| 60 | 60 | // MARK: - Helper functions for creating encoders and decoders |
| 61 | 61 | |
| 62 | -func newJSONDecoder() -> JSONDecoder { | |
| 62 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 63 | 63 | let decoder = JSONDecoder() |
| 64 | 64 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 65 | 65 | let container = try decoder.singleValueContainer() |
| @@ -82,7 +82,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 82 | 82 | return decoder |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | -func newJSONEncoder() -> JSONEncoder { | |
| 85 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 86 | 86 | let encoder = JSONEncoder() |
| 87 | 87 | let formatter = DateFormatter() |
| 88 | 88 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/cda6c.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -236,7 +236,7 @@ extension Array where Element == TopLevel.Element { | ||
| 236 | 236 | |
| 237 | 237 | // MARK: - Helper functions for creating encoders and decoders |
| 238 | 238 | |
| 239 | -func newJSONDecoder() -> JSONDecoder { | |
| 239 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 240 | 240 | let decoder = JSONDecoder() |
| 241 | 241 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 242 | 242 | let container = try decoder.singleValueContainer() |
| @@ -259,7 +259,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 259 | 259 | return decoder |
| 260 | 260 | } |
| 261 | 261 | |
| 262 | -func newJSONEncoder() -> JSONEncoder { | |
| 262 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 263 | 263 | let encoder = JSONEncoder() |
| 264 | 264 | let formatter = DateFormatter() |
| 265 | 265 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/cf0d8.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -807,7 +807,7 @@ extension Wind { | ||
| 807 | 807 | |
| 808 | 808 | // MARK: - Helper functions for creating encoders and decoders |
| 809 | 809 | |
| 810 | -func newJSONDecoder() -> JSONDecoder { | |
| 810 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 811 | 811 | let decoder = JSONDecoder() |
| 812 | 812 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 813 | 813 | let container = try decoder.singleValueContainer() |
| @@ -830,7 +830,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 830 | 830 | return decoder |
| 831 | 831 | } |
| 832 | 832 | |
| 833 | -func newJSONEncoder() -> JSONEncoder { | |
| 833 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 834 | 834 | let encoder = JSONEncoder() |
| 835 | 835 | let formatter = DateFormatter() |
| 836 | 836 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/cfbce.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -59,7 +59,7 @@ extension TopLevel { | ||
| 59 | 59 | |
| 60 | 60 | // MARK: - Helper functions for creating encoders and decoders |
| 61 | 61 | |
| 62 | -func newJSONDecoder() -> JSONDecoder { | |
| 62 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 63 | 63 | let decoder = JSONDecoder() |
| 64 | 64 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 65 | 65 | let container = try decoder.singleValueContainer() |
| @@ -82,7 +82,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 82 | 82 | return decoder |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | -func newJSONEncoder() -> JSONEncoder { | |
| 85 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 86 | 86 | let encoder = JSONEncoder() |
| 87 | 87 | let formatter = DateFormatter() |
| 88 | 88 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/d0908.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -99,7 +99,7 @@ extension TotalPopulation { | ||
| 99 | 99 | |
| 100 | 100 | // MARK: - Helper functions for creating encoders and decoders |
| 101 | 101 | |
| 102 | -func newJSONDecoder() -> JSONDecoder { | |
| 102 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 103 | 103 | let decoder = JSONDecoder() |
| 104 | 104 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 105 | 105 | let container = try decoder.singleValueContainer() |
| @@ -122,7 +122,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 122 | 122 | return decoder |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | -func newJSONEncoder() -> JSONEncoder { | |
| 125 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 126 | 126 | let encoder = JSONEncoder() |
| 127 | 127 | let formatter = DateFormatter() |
| 128 | 128 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/d23d5.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -176,7 +176,7 @@ extension Result { | ||
| 176 | 176 | |
| 177 | 177 | // MARK: - Helper functions for creating encoders and decoders |
| 178 | 178 | |
| 179 | -func newJSONDecoder() -> JSONDecoder { | |
| 179 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 180 | 180 | let decoder = JSONDecoder() |
| 181 | 181 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 182 | 182 | let container = try decoder.singleValueContainer() |
| @@ -199,7 +199,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 199 | 199 | return decoder |
| 200 | 200 | } |
| 201 | 201 | |
| 202 | -func newJSONEncoder() -> JSONEncoder { | |
| 202 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 203 | 203 | let encoder = JSONEncoder() |
| 204 | 204 | let formatter = DateFormatter() |
| 205 | 205 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/dbfb3.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -812,7 +812,7 @@ extension Wind { | ||
| 812 | 812 | |
| 813 | 813 | // MARK: - Helper functions for creating encoders and decoders |
| 814 | 814 | |
| 815 | -func newJSONDecoder() -> JSONDecoder { | |
| 815 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 816 | 816 | let decoder = JSONDecoder() |
| 817 | 817 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 818 | 818 | let container = try decoder.singleValueContainer() |
| @@ -835,7 +835,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 835 | 835 | return decoder |
| 836 | 836 | } |
| 837 | 837 | |
| 838 | -func newJSONEncoder() -> JSONEncoder { | |
| 838 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 839 | 839 | let encoder = JSONEncoder() |
| 840 | 840 | let formatter = DateFormatter() |
| 841 | 841 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/dc44f.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -420,7 +420,7 @@ enum TypeElement: String, Codable { | ||
| 420 | 420 | |
| 421 | 421 | // MARK: - Helper functions for creating encoders and decoders |
| 422 | 422 | |
| 423 | -func newJSONDecoder() -> JSONDecoder { | |
| 423 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 424 | 424 | let decoder = JSONDecoder() |
| 425 | 425 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 426 | 426 | let container = try decoder.singleValueContainer() |
| @@ -443,7 +443,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 443 | 443 | return decoder |
| 444 | 444 | } |
| 445 | 445 | |
| 446 | -func newJSONEncoder() -> JSONEncoder { | |
| 446 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 447 | 447 | let encoder = JSONEncoder() |
| 448 | 448 | let formatter = DateFormatter() |
| 449 | 449 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/dd1ce.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -420,7 +420,7 @@ enum TypeElement: String, Codable { | ||
| 420 | 420 | |
| 421 | 421 | // MARK: - Helper functions for creating encoders and decoders |
| 422 | 422 | |
| 423 | -func newJSONDecoder() -> JSONDecoder { | |
| 423 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 424 | 424 | let decoder = JSONDecoder() |
| 425 | 425 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 426 | 426 | let container = try decoder.singleValueContainer() |
| @@ -443,7 +443,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 443 | 443 | return decoder |
| 444 | 444 | } |
| 445 | 445 | |
| 446 | -func newJSONEncoder() -> JSONEncoder { | |
| 446 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 447 | 447 | let encoder = JSONEncoder() |
| 448 | 448 | let formatter = DateFormatter() |
| 449 | 449 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/dec3a.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -463,7 +463,7 @@ extension Location { | ||
| 463 | 463 | |
| 464 | 464 | // MARK: - Helper functions for creating encoders and decoders |
| 465 | 465 | |
| 466 | -func newJSONDecoder() -> JSONDecoder { | |
| 466 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 467 | 467 | let decoder = JSONDecoder() |
| 468 | 468 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 469 | 469 | let container = try decoder.singleValueContainer() |
| @@ -486,7 +486,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 486 | 486 | return decoder |
| 487 | 487 | } |
| 488 | 488 | |
| 489 | -func newJSONEncoder() -> JSONEncoder { | |
| 489 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 490 | 490 | let encoder = JSONEncoder() |
| 491 | 491 | let formatter = DateFormatter() |
| 492 | 492 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/df957.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -807,7 +807,7 @@ extension Wind { | ||
| 807 | 807 | |
| 808 | 808 | // MARK: - Helper functions for creating encoders and decoders |
| 809 | 809 | |
| 810 | -func newJSONDecoder() -> JSONDecoder { | |
| 810 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 811 | 811 | let decoder = JSONDecoder() |
| 812 | 812 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 813 | 813 | let container = try decoder.singleValueContainer() |
| @@ -830,7 +830,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 830 | 830 | return decoder |
| 831 | 831 | } |
| 832 | 832 | |
| 833 | -func newJSONEncoder() -> JSONEncoder { | |
| 833 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 834 | 834 | let encoder = JSONEncoder() |
| 835 | 835 | let formatter = DateFormatter() |
| 836 | 836 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/e0ac7.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -721,7 +721,7 @@ extension Pagination { | ||
| 721 | 721 | |
| 722 | 722 | // MARK: - Helper functions for creating encoders and decoders |
| 723 | 723 | |
| 724 | -func newJSONDecoder() -> JSONDecoder { | |
| 724 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 725 | 725 | let decoder = JSONDecoder() |
| 726 | 726 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 727 | 727 | let container = try decoder.singleValueContainer() |
| @@ -744,7 +744,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 744 | 744 | return decoder |
| 745 | 745 | } |
| 746 | 746 | |
| 747 | -func newJSONEncoder() -> JSONEncoder { | |
| 747 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 748 | 748 | let encoder = JSONEncoder() |
| 749 | 749 | let formatter = DateFormatter() |
| 750 | 750 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/e2915.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -811,7 +811,7 @@ extension Wind { | ||
| 811 | 811 | |
| 812 | 812 | // MARK: - Helper functions for creating encoders and decoders |
| 813 | 813 | |
| 814 | -func newJSONDecoder() -> JSONDecoder { | |
| 814 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 815 | 815 | let decoder = JSONDecoder() |
| 816 | 816 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 817 | 817 | let container = try decoder.singleValueContainer() |
| @@ -834,7 +834,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 834 | 834 | return decoder |
| 835 | 835 | } |
| 836 | 836 | |
| 837 | -func newJSONEncoder() -> JSONEncoder { | |
| 837 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 838 | 838 | let encoder = JSONEncoder() |
| 839 | 839 | let formatter = DateFormatter() |
| 840 | 840 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/e2a58.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -82,7 +82,7 @@ extension Array where Element == TopLevel.Element { | ||
| 82 | 82 | |
| 83 | 83 | // MARK: - Helper functions for creating encoders and decoders |
| 84 | 84 | |
| 85 | -func newJSONDecoder() -> JSONDecoder { | |
| 85 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 86 | 86 | let decoder = JSONDecoder() |
| 87 | 87 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 88 | 88 | let container = try decoder.singleValueContainer() |
| @@ -105,7 +105,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 105 | 105 | return decoder |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | -func newJSONEncoder() -> JSONEncoder { | |
| 108 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 109 | 109 | let encoder = JSONEncoder() |
| 110 | 110 | let formatter = DateFormatter() |
| 111 | 111 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/e324e.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -667,7 +667,7 @@ extension Items { | ||
| 667 | 667 | |
| 668 | 668 | // MARK: - Helper functions for creating encoders and decoders |
| 669 | 669 | |
| 670 | -func newJSONDecoder() -> JSONDecoder { | |
| 670 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 671 | 671 | let decoder = JSONDecoder() |
| 672 | 672 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 673 | 673 | let container = try decoder.singleValueContainer() |
| @@ -690,7 +690,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 690 | 690 | return decoder |
| 691 | 691 | } |
| 692 | 692 | |
| 693 | -func newJSONEncoder() -> JSONEncoder { | |
| 693 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 694 | 694 | let encoder = JSONEncoder() |
| 695 | 695 | let formatter = DateFormatter() |
| 696 | 696 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/e53b5.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -236,7 +236,7 @@ extension Array where Element == TopLevel.Element { | ||
| 236 | 236 | |
| 237 | 237 | // MARK: - Helper functions for creating encoders and decoders |
| 238 | 238 | |
| 239 | -func newJSONDecoder() -> JSONDecoder { | |
| 239 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 240 | 240 | let decoder = JSONDecoder() |
| 241 | 241 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 242 | 242 | let container = try decoder.singleValueContainer() |
| @@ -259,7 +259,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 259 | 259 | return decoder |
| 260 | 260 | } |
| 261 | 261 | |
| 262 | -func newJSONEncoder() -> JSONEncoder { | |
| 262 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 263 | 263 | let encoder = JSONEncoder() |
| 264 | 264 | let formatter = DateFormatter() |
| 265 | 265 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/e64a0.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -156,7 +156,7 @@ extension Headers { | ||
| 156 | 156 | |
| 157 | 157 | // MARK: - Helper functions for creating encoders and decoders |
| 158 | 158 | |
| 159 | -func newJSONDecoder() -> JSONDecoder { | |
| 159 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 160 | 160 | let decoder = JSONDecoder() |
| 161 | 161 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 162 | 162 | let container = try decoder.singleValueContainer() |
| @@ -179,7 +179,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 179 | 179 | return decoder |
| 180 | 180 | } |
| 181 | 181 | |
| 182 | -func newJSONEncoder() -> JSONEncoder { | |
| 182 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 183 | 183 | let encoder = JSONEncoder() |
| 184 | 184 | let formatter = DateFormatter() |
| 185 | 185 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/e8a0b.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -102,7 +102,7 @@ extension Array where Element == TopLevel.Element { | ||
| 102 | 102 | |
| 103 | 103 | // MARK: - Helper functions for creating encoders and decoders |
| 104 | 104 | |
| 105 | -func newJSONDecoder() -> JSONDecoder { | |
| 105 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 106 | 106 | let decoder = JSONDecoder() |
| 107 | 107 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 108 | 108 | let container = try decoder.singleValueContainer() |
| @@ -125,7 +125,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 125 | 125 | return decoder |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | -func newJSONEncoder() -> JSONEncoder { | |
| 128 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 129 | 129 | let encoder = JSONEncoder() |
| 130 | 130 | let formatter = DateFormatter() |
| 131 | 131 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/e8b04.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -1699,7 +1699,7 @@ extension Array where Element == TopLevel.Element { | ||
| 1699 | 1699 | |
| 1700 | 1700 | // MARK: - Helper functions for creating encoders and decoders |
| 1701 | 1701 | |
| 1702 | -func newJSONDecoder() -> JSONDecoder { | |
| 1702 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 1703 | 1703 | let decoder = JSONDecoder() |
| 1704 | 1704 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 1705 | 1705 | let container = try decoder.singleValueContainer() |
| @@ -1722,7 +1722,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 1722 | 1722 | return decoder |
| 1723 | 1723 | } |
| 1724 | 1724 | |
| 1725 | -func newJSONEncoder() -> JSONEncoder { | |
| 1725 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 1726 | 1726 | let encoder = JSONEncoder() |
| 1727 | 1727 | let formatter = DateFormatter() |
| 1728 | 1728 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/ed095.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -33,7 +33,7 @@ extension Dictionary where Key == String, Value == String { | ||
| 33 | 33 | |
| 34 | 34 | // MARK: - Helper functions for creating encoders and decoders |
| 35 | 35 | |
| 36 | -func newJSONDecoder() -> JSONDecoder { | |
| 36 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 37 | 37 | let decoder = JSONDecoder() |
| 38 | 38 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 39 | 39 | let container = try decoder.singleValueContainer() |
| @@ -56,7 +56,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 56 | 56 | return decoder |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | -func newJSONEncoder() -> JSONEncoder { | |
| 59 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 60 | 60 | let encoder = JSONEncoder() |
| 61 | 61 | let formatter = DateFormatter() |
| 62 | 62 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/f22f5.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -496,7 +496,7 @@ enum Kind: String, Codable { | ||
| 496 | 496 | |
| 497 | 497 | // MARK: - Helper functions for creating encoders and decoders |
| 498 | 498 | |
| 499 | -func newJSONDecoder() -> JSONDecoder { | |
| 499 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 500 | 500 | let decoder = JSONDecoder() |
| 501 | 501 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 502 | 502 | let container = try decoder.singleValueContainer() |
| @@ -519,7 +519,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 519 | 519 | return decoder |
| 520 | 520 | } |
| 521 | 521 | |
| 522 | -func newJSONEncoder() -> JSONEncoder { | |
| 522 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 523 | 523 | let encoder = JSONEncoder() |
| 524 | 524 | let formatter = DateFormatter() |
| 525 | 525 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/f3139.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -82,7 +82,7 @@ extension Array where Element == TopLevel.Element { | ||
| 82 | 82 | |
| 83 | 83 | // MARK: - Helper functions for creating encoders and decoders |
| 84 | 84 | |
| 85 | -func newJSONDecoder() -> JSONDecoder { | |
| 85 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 86 | 86 | let decoder = JSONDecoder() |
| 87 | 87 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 88 | 88 | let container = try decoder.singleValueContainer() |
| @@ -105,7 +105,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 105 | 105 | return decoder |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | -func newJSONEncoder() -> JSONEncoder { | |
| 108 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 109 | 109 | let encoder = JSONEncoder() |
| 110 | 110 | let formatter = DateFormatter() |
| 111 | 111 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/f3edf.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -102,7 +102,7 @@ extension Array where Element == TopLevel.Element { | ||
| 102 | 102 | |
| 103 | 103 | // MARK: - Helper functions for creating encoders and decoders |
| 104 | 104 | |
| 105 | -func newJSONDecoder() -> JSONDecoder { | |
| 105 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 106 | 106 | let decoder = JSONDecoder() |
| 107 | 107 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 108 | 108 | let container = try decoder.singleValueContainer() |
| @@ -125,7 +125,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 125 | 125 | return decoder |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | -func newJSONEncoder() -> JSONEncoder { | |
| 128 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 129 | 129 | let encoder = JSONEncoder() |
| 130 | 130 | let formatter = DateFormatter() |
| 131 | 131 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/f466a.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -102,7 +102,7 @@ extension Array where Element == TopLevel.Element { | ||
| 102 | 102 | |
| 103 | 103 | // MARK: - Helper functions for creating encoders and decoders |
| 104 | 104 | |
| 105 | -func newJSONDecoder() -> JSONDecoder { | |
| 105 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 106 | 106 | let decoder = JSONDecoder() |
| 107 | 107 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 108 | 108 | let container = try decoder.singleValueContainer() |
| @@ -125,7 +125,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 125 | 125 | return decoder |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | -func newJSONEncoder() -> JSONEncoder { | |
| 128 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 129 | 129 | let encoder = JSONEncoder() |
| 130 | 130 | let formatter = DateFormatter() |
| 131 | 131 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/f6a65.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -729,7 +729,7 @@ extension Pagination { | ||
| 729 | 729 | |
| 730 | 730 | // MARK: - Helper functions for creating encoders and decoders |
| 731 | 731 | |
| 732 | -func newJSONDecoder() -> JSONDecoder { | |
| 732 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 733 | 733 | let decoder = JSONDecoder() |
| 734 | 734 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 735 | 735 | let container = try decoder.singleValueContainer() |
| @@ -752,7 +752,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 752 | 752 | return decoder |
| 753 | 753 | } |
| 754 | 754 | |
| 755 | -func newJSONEncoder() -> JSONEncoder { | |
| 755 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 756 | 756 | let encoder = JSONEncoder() |
| 757 | 757 | let formatter = DateFormatter() |
| 758 | 758 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/f74d5.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -854,7 +854,7 @@ extension Owner { | ||
| 854 | 854 | |
| 855 | 855 | // MARK: - Helper functions for creating encoders and decoders |
| 856 | 856 | |
| 857 | -func newJSONDecoder() -> JSONDecoder { | |
| 857 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 858 | 858 | let decoder = JSONDecoder() |
| 859 | 859 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 860 | 860 | let container = try decoder.singleValueContainer() |
| @@ -877,7 +877,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 877 | 877 | return decoder |
| 878 | 878 | } |
| 879 | 879 | |
| 880 | -func newJSONEncoder() -> JSONEncoder { | |
| 880 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 881 | 881 | let encoder = JSONEncoder() |
| 882 | 882 | let formatter = DateFormatter() |
| 883 | 883 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/f82d9.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -747,7 +747,7 @@ extension Items { | ||
| 747 | 747 | |
| 748 | 748 | // MARK: - Helper functions for creating encoders and decoders |
| 749 | 749 | |
| 750 | -func newJSONDecoder() -> JSONDecoder { | |
| 750 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 751 | 751 | let decoder = JSONDecoder() |
| 752 | 752 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 753 | 753 | let container = try decoder.singleValueContainer() |
| @@ -770,7 +770,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 770 | 770 | return decoder |
| 771 | 771 | } |
| 772 | 772 | |
| 773 | -func newJSONEncoder() -> JSONEncoder { | |
| 773 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 774 | 774 | let encoder = JSONEncoder() |
| 775 | 775 | let formatter = DateFormatter() |
| 776 | 776 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/f974d.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -67,7 +67,7 @@ extension TopLevel { | ||
| 67 | 67 | |
| 68 | 68 | // MARK: - Helper functions for creating encoders and decoders |
| 69 | 69 | |
| 70 | -func newJSONDecoder() -> JSONDecoder { | |
| 70 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 71 | 71 | let decoder = JSONDecoder() |
| 72 | 72 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 73 | 73 | let container = try decoder.singleValueContainer() |
| @@ -90,7 +90,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 90 | 90 | return decoder |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | -func newJSONEncoder() -> JSONEncoder { | |
| 93 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 94 | 94 | let encoder = JSONEncoder() |
| 95 | 95 | let formatter = DateFormatter() |
| 96 | 96 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/faff5.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -99,7 +99,7 @@ extension Response { | ||
| 99 | 99 | |
| 100 | 100 | // MARK: - Helper functions for creating encoders and decoders |
| 101 | 101 | |
| 102 | -func newJSONDecoder() -> JSONDecoder { | |
| 102 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 103 | 103 | let decoder = JSONDecoder() |
| 104 | 104 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 105 | 105 | let container = try decoder.singleValueContainer() |
| @@ -122,7 +122,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 122 | 122 | return decoder |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | -func newJSONEncoder() -> JSONEncoder { | |
| 125 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 126 | 126 | let encoder = JSONEncoder() |
| 127 | 127 | let formatter = DateFormatter() |
| 128 | 128 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/fcca3.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -1672,7 +1672,7 @@ extension Expression { | ||
| 1672 | 1672 | |
| 1673 | 1673 | // MARK: - Helper functions for creating encoders and decoders |
| 1674 | 1674 | |
| 1675 | -func newJSONDecoder() -> JSONDecoder { | |
| 1675 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 1676 | 1676 | let decoder = JSONDecoder() |
| 1677 | 1677 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 1678 | 1678 | let container = try decoder.singleValueContainer() |
| @@ -1695,7 +1695,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 1695 | 1695 | return decoder |
| 1696 | 1696 | } |
| 1697 | 1697 | |
| 1698 | -func newJSONEncoder() -> JSONEncoder { | |
| 1698 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 1699 | 1699 | let encoder = JSONEncoder() |
| 1700 | 1700 | let formatter = DateFormatter() |
| 1701 | 1701 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/misc/fd329.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -159,7 +159,7 @@ extension Description { | ||
| 159 | 159 | |
| 160 | 160 | // MARK: - Helper functions for creating encoders and decoders |
| 161 | 161 | |
| 162 | -func newJSONDecoder() -> JSONDecoder { | |
| 162 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 163 | 163 | let decoder = JSONDecoder() |
| 164 | 164 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 165 | 165 | let container = try decoder.singleValueContainer() |
| @@ -182,7 +182,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 182 | 182 | return decoder |
| 183 | 183 | } |
| 184 | 184 | |
| 185 | -func newJSONEncoder() -> JSONEncoder { | |
| 185 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 186 | 186 | let encoder = JSONEncoder() |
| 187 | 187 | let formatter = DateFormatter() |
| 188 | 188 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/priority/bug2037.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -176,7 +176,7 @@ extension Reward { | ||
| 176 | 176 | |
| 177 | 177 | // MARK: - Helper functions for creating encoders and decoders |
| 178 | 178 | |
| 179 | -func newJSONDecoder() -> JSONDecoder { | |
| 179 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 180 | 180 | let decoder = JSONDecoder() |
| 181 | 181 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 182 | 182 | let container = try decoder.singleValueContainer() |
| @@ -199,7 +199,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 199 | 199 | return decoder |
| 200 | 200 | } |
| 201 | 201 | |
| 202 | -func newJSONEncoder() -> JSONEncoder { | |
| 202 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 203 | 203 | let encoder = JSONEncoder() |
| 204 | 204 | let formatter = DateFormatter() |
| 205 | 205 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/priority/bug2521.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -99,7 +99,7 @@ extension Option { | ||
| 99 | 99 | |
| 100 | 100 | // MARK: - Helper functions for creating encoders and decoders |
| 101 | 101 | |
| 102 | -func newJSONDecoder() -> JSONDecoder { | |
| 102 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 103 | 103 | let decoder = JSONDecoder() |
| 104 | 104 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 105 | 105 | let container = try decoder.singleValueContainer() |
| @@ -122,7 +122,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 122 | 122 | return decoder |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | -func newJSONEncoder() -> JSONEncoder { | |
| 125 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 126 | 126 | let encoder = JSONEncoder() |
| 127 | 127 | let formatter = DateFormatter() |
| 128 | 128 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/priority/bug2590.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -103,7 +103,7 @@ extension Invoice { | ||
| 103 | 103 | |
| 104 | 104 | // MARK: - Helper functions for creating encoders and decoders |
| 105 | 105 | |
| 106 | -func newJSONDecoder() -> JSONDecoder { | |
| 106 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 107 | 107 | let decoder = JSONDecoder() |
| 108 | 108 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 109 | 109 | let container = try decoder.singleValueContainer() |
| @@ -126,7 +126,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 126 | 126 | return decoder |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | -func newJSONEncoder() -> JSONEncoder { | |
| 129 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 130 | 130 | let encoder = JSONEncoder() |
| 131 | 131 | let formatter = DateFormatter() |
| 132 | 132 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/priority/bug2663.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -59,7 +59,7 @@ extension TopLevel { | ||
| 59 | 59 | |
| 60 | 60 | // MARK: - Helper functions for creating encoders and decoders |
| 61 | 61 | |
| 62 | -func newJSONDecoder() -> JSONDecoder { | |
| 62 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 63 | 63 | let decoder = JSONDecoder() |
| 64 | 64 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 65 | 65 | let container = try decoder.singleValueContainer() |
| @@ -82,7 +82,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 82 | 82 | return decoder |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | -func newJSONEncoder() -> JSONEncoder { | |
| 85 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 86 | 86 | let encoder = JSONEncoder() |
| 87 | 87 | let formatter = DateFormatter() |
| 88 | 88 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/priority/bug2793.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -140,7 +140,7 @@ extension Labels { | ||
| 140 | 140 | |
| 141 | 141 | // MARK: - Helper functions for creating encoders and decoders |
| 142 | 142 | |
| 143 | -func newJSONDecoder() -> JSONDecoder { | |
| 143 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 144 | 144 | let decoder = JSONDecoder() |
| 145 | 145 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 146 | 146 | let container = try decoder.singleValueContainer() |
| @@ -163,7 +163,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 163 | 163 | return decoder |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | -func newJSONEncoder() -> JSONEncoder { | |
| 166 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 167 | 167 | let encoder = JSONEncoder() |
| 168 | 168 | let formatter = DateFormatter() |
| 169 | 169 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/priority/bug427.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -4006,7 +4006,7 @@ enum TentacledKindString: String, Codable { | ||
| 4006 | 4006 | |
| 4007 | 4007 | // MARK: - Helper functions for creating encoders and decoders |
| 4008 | 4008 | |
| 4009 | -func newJSONDecoder() -> JSONDecoder { | |
| 4009 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 4010 | 4010 | let decoder = JSONDecoder() |
| 4011 | 4011 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 4012 | 4012 | let container = try decoder.singleValueContainer() |
| @@ -4029,7 +4029,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 4029 | 4029 | return decoder |
| 4030 | 4030 | } |
| 4031 | 4031 | |
| 4032 | -func newJSONEncoder() -> JSONEncoder { | |
| 4032 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 4033 | 4033 | let encoder = JSONEncoder() |
| 4034 | 4034 | let formatter = DateFormatter() |
| 4035 | 4035 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/priority/bug790.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -79,7 +79,7 @@ extension TopLevel { | ||
| 79 | 79 | |
| 80 | 80 | // MARK: - Helper functions for creating encoders and decoders |
| 81 | 81 | |
| 82 | -func newJSONDecoder() -> JSONDecoder { | |
| 82 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 83 | 83 | let decoder = JSONDecoder() |
| 84 | 84 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 85 | 85 | let container = try decoder.singleValueContainer() |
| @@ -102,7 +102,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 102 | 102 | return decoder |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | -func newJSONEncoder() -> JSONEncoder { | |
| 105 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 106 | 106 | let encoder = JSONEncoder() |
| 107 | 107 | let formatter = DateFormatter() |
| 108 | 108 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/priority/bug855-short.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -94,7 +94,7 @@ extension Dictionary where Key == String, Value == TopLevelValue { | ||
| 94 | 94 | |
| 95 | 95 | // MARK: - Helper functions for creating encoders and decoders |
| 96 | 96 | |
| 97 | -func newJSONDecoder() -> JSONDecoder { | |
| 97 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 98 | 98 | let decoder = JSONDecoder() |
| 99 | 99 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 100 | 100 | let container = try decoder.singleValueContainer() |
| @@ -117,7 +117,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 117 | 117 | return decoder |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | -func newJSONEncoder() -> JSONEncoder { | |
| 120 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 121 | 121 | let encoder = JSONEncoder() |
| 122 | 122 | let formatter = DateFormatter() |
| 123 | 123 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/priority/bug863.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -391,7 +391,7 @@ extension Array where Element == TopLevel.Element { | ||
| 391 | 391 | |
| 392 | 392 | // MARK: - Helper functions for creating encoders and decoders |
| 393 | 393 | |
| 394 | -func newJSONDecoder() -> JSONDecoder { | |
| 394 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 395 | 395 | let decoder = JSONDecoder() |
| 396 | 396 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 397 | 397 | let container = try decoder.singleValueContainer() |
| @@ -414,7 +414,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 414 | 414 | return decoder |
| 415 | 415 | } |
| 416 | 416 | |
| 417 | -func newJSONEncoder() -> JSONEncoder { | |
| 417 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 418 | 418 | let encoder = JSONEncoder() |
| 419 | 419 | let formatter = DateFormatter() |
| 420 | 420 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/priority/coin-pairs.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -127,7 +127,7 @@ extension Pair { | ||
| 127 | 127 | |
| 128 | 128 | // MARK: - Helper functions for creating encoders and decoders |
| 129 | 129 | |
| 130 | -func newJSONDecoder() -> JSONDecoder { | |
| 130 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 131 | 131 | let decoder = JSONDecoder() |
| 132 | 132 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 133 | 133 | let container = try decoder.singleValueContainer() |
| @@ -150,7 +150,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 150 | 150 | return decoder |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | -func newJSONEncoder() -> JSONEncoder { | |
| 153 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 154 | 154 | let encoder = JSONEncoder() |
| 155 | 155 | let formatter = DateFormatter() |
| 156 | 156 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
7 generated files · +14 −14test/inputs/json/priority/combinations1.json
Mswiftaccess-level-internal--a653a863c206 / quicktype.swift+2 −2
| @@ -2776,7 +2776,7 @@ enum Jacutinga: Codable { | ||
| 2776 | 2776 | |
| 2777 | 2777 | // MARK: - Helper functions for creating encoders and decoders |
| 2778 | 2778 | |
| 2779 | -func newJSONDecoder() -> JSONDecoder { | |
| 2779 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 2780 | 2780 | let decoder = JSONDecoder() |
| 2781 | 2781 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 2782 | 2782 | let container = try decoder.singleValueContainer() |
| @@ -2799,7 +2799,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 2799 | 2799 | return decoder |
| 2800 | 2800 | } |
| 2801 | 2801 | |
| 2802 | -func newJSONEncoder() -> JSONEncoder { | |
| 2802 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 2803 | 2803 | let encoder = JSONEncoder() |
| 2804 | 2804 | let formatter = DateFormatter() |
| 2805 | 2805 | formatter.calendar = Calendar(identifier: .iso8601) |
Mswiftaccess-level-public--bc6fc37ec004 / quicktype.swift+2 −2
| @@ -3106,7 +3106,7 @@ public enum Jacutinga: Codable { | ||
| 3106 | 3106 | |
| 3107 | 3107 | // MARK: - Helper functions for creating encoders and decoders |
| 3108 | 3108 | |
| 3109 | -func newJSONDecoder() -> JSONDecoder { | |
| 3109 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 3110 | 3110 | let decoder = JSONDecoder() |
| 3111 | 3111 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 3112 | 3112 | let container = try decoder.singleValueContainer() |
| @@ -3129,7 +3129,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 3129 | 3129 | return decoder |
| 3130 | 3130 | } |
| 3131 | 3131 | |
| 3132 | -func newJSONEncoder() -> JSONEncoder { | |
| 3132 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 3133 | 3133 | let encoder = JSONEncoder() |
| 3134 | 3134 | let formatter = DateFormatter() |
| 3135 | 3135 | formatter.calendar = Calendar(identifier: .iso8601) |
Mswiftdefault / quicktype.swift+2 −2
| @@ -2776,7 +2776,7 @@ enum Jacutinga: Codable { | ||
| 2776 | 2776 | |
| 2777 | 2777 | // MARK: - Helper functions for creating encoders and decoders |
| 2778 | 2778 | |
| 2779 | -func newJSONDecoder() -> JSONDecoder { | |
| 2779 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 2780 | 2780 | let decoder = JSONDecoder() |
| 2781 | 2781 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 2782 | 2782 | let container = try decoder.singleValueContainer() |
| @@ -2799,7 +2799,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 2799 | 2799 | return decoder |
| 2800 | 2800 | } |
| 2801 | 2801 | |
| 2802 | -func newJSONEncoder() -> JSONEncoder { | |
| 2802 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 2803 | 2803 | let encoder = JSONEncoder() |
| 2804 | 2804 | let formatter = DateFormatter() |
| 2805 | 2805 | formatter.calendar = Calendar(identifier: .iso8601) |
Mswiftdensity-dense--3bfb4c22cfd0 / quicktype.swift+2 −2
| @@ -2390,7 +2390,7 @@ enum Jacutinga: Codable { | ||
| 2390 | 2390 | |
| 2391 | 2391 | // MARK: - Helper functions for creating encoders and decoders |
| 2392 | 2392 | |
| 2393 | -func newJSONDecoder() -> JSONDecoder { | |
| 2393 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 2394 | 2394 | let decoder = JSONDecoder() |
| 2395 | 2395 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 2396 | 2396 | let container = try decoder.singleValueContainer() |
| @@ -2413,7 +2413,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 2413 | 2413 | return decoder |
| 2414 | 2414 | } |
| 2415 | 2415 | |
| 2416 | -func newJSONEncoder() -> JSONEncoder { | |
| 2416 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 2417 | 2417 | let encoder = JSONEncoder() |
| 2418 | 2418 | let formatter = DateFormatter() |
| 2419 | 2419 | formatter.calendar = Calendar(identifier: .iso8601) |
Mswiftprotocol-equatable--bd9068f466c1 / quicktype.swift+2 −2
| @@ -2860,7 +2860,7 @@ enum Jacutinga: Codable, Equatable { | ||
| 2860 | 2860 | |
| 2861 | 2861 | // MARK: - Helper functions for creating encoders and decoders |
| 2862 | 2862 | |
| 2863 | -func newJSONDecoder() -> JSONDecoder { | |
| 2863 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 2864 | 2864 | let decoder = JSONDecoder() |
| 2865 | 2865 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 2866 | 2866 | let container = try decoder.singleValueContainer() |
| @@ -2883,7 +2883,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 2883 | 2883 | return decoder |
| 2884 | 2884 | } |
| 2885 | 2885 | |
| 2886 | -func newJSONEncoder() -> JSONEncoder { | |
| 2886 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 2887 | 2887 | let encoder = JSONEncoder() |
| 2888 | 2888 | let formatter = DateFormatter() |
| 2889 | 2889 | formatter.calendar = Calendar(identifier: .iso8601) |
Mswiftstruct-or-class-class--238d6c8a12d4 / quicktype.swift+2 −2
| @@ -3120,7 +3120,7 @@ enum Jacutinga: Codable { | ||
| 3120 | 3120 | |
| 3121 | 3121 | // MARK: - Helper functions for creating encoders and decoders |
| 3122 | 3122 | |
| 3123 | -func newJSONDecoder() -> JSONDecoder { | |
| 3123 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 3124 | 3124 | let decoder = JSONDecoder() |
| 3125 | 3125 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 3126 | 3126 | let container = try decoder.singleValueContainer() |
| @@ -3143,7 +3143,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 3143 | 3143 | return decoder |
| 3144 | 3144 | } |
| 3145 | 3145 | |
| 3146 | -func newJSONEncoder() -> JSONEncoder { | |
| 3146 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 3147 | 3147 | let encoder = JSONEncoder() |
| 3148 | 3148 | let formatter = DateFormatter() |
| 3149 | 3149 | formatter.calendar = Calendar(identifier: .iso8601) |
Mswiftsupport-linux-false--4bd8c552e09a / quicktype.swift+2 −2
| @@ -2776,7 +2776,7 @@ enum Jacutinga: Codable { | ||
| 2776 | 2776 | |
| 2777 | 2777 | // MARK: - Helper functions for creating encoders and decoders |
| 2778 | 2778 | |
| 2779 | -func newJSONDecoder() -> JSONDecoder { | |
| 2779 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 2780 | 2780 | let decoder = JSONDecoder() |
| 2781 | 2781 | if #available(iOS 10.0, OSX 10.12, tvOS 10.0, watchOS 3.0, *) { |
| 2782 | 2782 | decoder.dateDecodingStrategy = .iso8601 |
| @@ -2784,7 +2784,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 2784 | 2784 | return decoder |
| 2785 | 2785 | } |
| 2786 | 2786 | |
| 2787 | -func newJSONEncoder() -> JSONEncoder { | |
| 2787 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 2788 | 2788 | let encoder = JSONEncoder() |
| 2789 | 2789 | if #available(iOS 10.0, OSX 10.12, tvOS 10.0, watchOS 3.0, *) { |
| 2790 | 2790 | encoder.dateEncodingStrategy = .iso8601 |
Test case
7 generated files · +14 −14test/inputs/json/priority/combinations2.json
Mswiftaccess-level-internal--a653a863c206 / quicktype.swift+2 −2
| @@ -2540,7 +2540,7 @@ enum Shakespearolater: Codable { | ||
| 2540 | 2540 | |
| 2541 | 2541 | // MARK: - Helper functions for creating encoders and decoders |
| 2542 | 2542 | |
| 2543 | -func newJSONDecoder() -> JSONDecoder { | |
| 2543 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 2544 | 2544 | let decoder = JSONDecoder() |
| 2545 | 2545 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 2546 | 2546 | let container = try decoder.singleValueContainer() |
| @@ -2563,7 +2563,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 2563 | 2563 | return decoder |
| 2564 | 2564 | } |
| 2565 | 2565 | |
| 2566 | -func newJSONEncoder() -> JSONEncoder { | |
| 2566 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 2567 | 2567 | let encoder = JSONEncoder() |
| 2568 | 2568 | let formatter = DateFormatter() |
| 2569 | 2569 | formatter.calendar = Calendar(identifier: .iso8601) |
Mswiftaccess-level-public--bc6fc37ec004 / quicktype.swift+2 −2
| @@ -2818,7 +2818,7 @@ public enum Shakespearolater: Codable { | ||
| 2818 | 2818 | |
| 2819 | 2819 | // MARK: - Helper functions for creating encoders and decoders |
| 2820 | 2820 | |
| 2821 | -func newJSONDecoder() -> JSONDecoder { | |
| 2821 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 2822 | 2822 | let decoder = JSONDecoder() |
| 2823 | 2823 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 2824 | 2824 | let container = try decoder.singleValueContainer() |
| @@ -2841,7 +2841,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 2841 | 2841 | return decoder |
| 2842 | 2842 | } |
| 2843 | 2843 | |
| 2844 | -func newJSONEncoder() -> JSONEncoder { | |
| 2844 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 2845 | 2845 | let encoder = JSONEncoder() |
| 2846 | 2846 | let formatter = DateFormatter() |
| 2847 | 2847 | formatter.calendar = Calendar(identifier: .iso8601) |
Mswiftdefault / quicktype.swift+2 −2
| @@ -2540,7 +2540,7 @@ enum Shakespearolater: Codable { | ||
| 2540 | 2540 | |
| 2541 | 2541 | // MARK: - Helper functions for creating encoders and decoders |
| 2542 | 2542 | |
| 2543 | -func newJSONDecoder() -> JSONDecoder { | |
| 2543 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 2544 | 2544 | let decoder = JSONDecoder() |
| 2545 | 2545 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 2546 | 2546 | let container = try decoder.singleValueContainer() |
| @@ -2563,7 +2563,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 2563 | 2563 | return decoder |
| 2564 | 2564 | } |
| 2565 | 2565 | |
| 2566 | -func newJSONEncoder() -> JSONEncoder { | |
| 2566 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 2567 | 2567 | let encoder = JSONEncoder() |
| 2568 | 2568 | let formatter = DateFormatter() |
| 2569 | 2569 | formatter.calendar = Calendar(identifier: .iso8601) |
Mswiftdensity-dense--3bfb4c22cfd0 / quicktype.swift+2 −2
| @@ -2242,7 +2242,7 @@ enum Shakespearolater: Codable { | ||
| 2242 | 2242 | |
| 2243 | 2243 | // MARK: - Helper functions for creating encoders and decoders |
| 2244 | 2244 | |
| 2245 | -func newJSONDecoder() -> JSONDecoder { | |
| 2245 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 2246 | 2246 | let decoder = JSONDecoder() |
| 2247 | 2247 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 2248 | 2248 | let container = try decoder.singleValueContainer() |
| @@ -2265,7 +2265,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 2265 | 2265 | return decoder |
| 2266 | 2266 | } |
| 2267 | 2267 | |
| 2268 | -func newJSONEncoder() -> JSONEncoder { | |
| 2268 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 2269 | 2269 | let encoder = JSONEncoder() |
| 2270 | 2270 | let formatter = DateFormatter() |
| 2271 | 2271 | formatter.calendar = Calendar(identifier: .iso8601) |
Mswiftprotocol-equatable--bd9068f466c1 / quicktype.swift+2 −2
| @@ -2606,7 +2606,7 @@ enum Shakespearolater: Codable, Equatable { | ||
| 2606 | 2606 | |
| 2607 | 2607 | // MARK: - Helper functions for creating encoders and decoders |
| 2608 | 2608 | |
| 2609 | -func newJSONDecoder() -> JSONDecoder { | |
| 2609 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 2610 | 2610 | let decoder = JSONDecoder() |
| 2611 | 2611 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 2612 | 2612 | let container = try decoder.singleValueContainer() |
| @@ -2629,7 +2629,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 2629 | 2629 | return decoder |
| 2630 | 2630 | } |
| 2631 | 2631 | |
| 2632 | -func newJSONEncoder() -> JSONEncoder { | |
| 2632 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 2633 | 2633 | let encoder = JSONEncoder() |
| 2634 | 2634 | let formatter = DateFormatter() |
| 2635 | 2635 | formatter.calendar = Calendar(identifier: .iso8601) |
Mswiftstruct-or-class-class--238d6c8a12d4 / quicktype.swift+2 −2
| @@ -2829,7 +2829,7 @@ enum Shakespearolater: Codable { | ||
| 2829 | 2829 | |
| 2830 | 2830 | // MARK: - Helper functions for creating encoders and decoders |
| 2831 | 2831 | |
| 2832 | -func newJSONDecoder() -> JSONDecoder { | |
| 2832 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 2833 | 2833 | let decoder = JSONDecoder() |
| 2834 | 2834 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 2835 | 2835 | let container = try decoder.singleValueContainer() |
| @@ -2852,7 +2852,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 2852 | 2852 | return decoder |
| 2853 | 2853 | } |
| 2854 | 2854 | |
| 2855 | -func newJSONEncoder() -> JSONEncoder { | |
| 2855 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 2856 | 2856 | let encoder = JSONEncoder() |
| 2857 | 2857 | let formatter = DateFormatter() |
| 2858 | 2858 | formatter.calendar = Calendar(identifier: .iso8601) |
Mswiftsupport-linux-false--4bd8c552e09a / quicktype.swift+2 −2
| @@ -2540,7 +2540,7 @@ enum Shakespearolater: Codable { | ||
| 2540 | 2540 | |
| 2541 | 2541 | // MARK: - Helper functions for creating encoders and decoders |
| 2542 | 2542 | |
| 2543 | -func newJSONDecoder() -> JSONDecoder { | |
| 2543 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 2544 | 2544 | let decoder = JSONDecoder() |
| 2545 | 2545 | if #available(iOS 10.0, OSX 10.12, tvOS 10.0, watchOS 3.0, *) { |
| 2546 | 2546 | decoder.dateDecodingStrategy = .iso8601 |
| @@ -2548,7 +2548,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 2548 | 2548 | return decoder |
| 2549 | 2549 | } |
| 2550 | 2550 | |
| 2551 | -func newJSONEncoder() -> JSONEncoder { | |
| 2551 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 2552 | 2552 | let encoder = JSONEncoder() |
| 2553 | 2553 | if #available(iOS 10.0, OSX 10.12, tvOS 10.0, watchOS 3.0, *) { |
| 2554 | 2554 | encoder.dateEncodingStrategy = .iso8601 |
Test case
7 generated files · +14 −14test/inputs/json/priority/combinations3.json
Mswiftaccess-level-internal--a653a863c206 / quicktype.swift+2 −2
| @@ -3075,7 +3075,7 @@ enum Protext: Codable { | ||
| 3075 | 3075 | |
| 3076 | 3076 | // MARK: - Helper functions for creating encoders and decoders |
| 3077 | 3077 | |
| 3078 | -func newJSONDecoder() -> JSONDecoder { | |
| 3078 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 3079 | 3079 | let decoder = JSONDecoder() |
| 3080 | 3080 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 3081 | 3081 | let container = try decoder.singleValueContainer() |
| @@ -3098,7 +3098,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 3098 | 3098 | return decoder |
| 3099 | 3099 | } |
| 3100 | 3100 | |
| 3101 | -func newJSONEncoder() -> JSONEncoder { | |
| 3101 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 3102 | 3102 | let encoder = JSONEncoder() |
| 3103 | 3103 | let formatter = DateFormatter() |
| 3104 | 3104 | formatter.calendar = Calendar(identifier: .iso8601) |
Mswiftaccess-level-public--bc6fc37ec004 / quicktype.swift+2 −2
| @@ -3457,7 +3457,7 @@ public enum Protext: Codable { | ||
| 3457 | 3457 | |
| 3458 | 3458 | // MARK: - Helper functions for creating encoders and decoders |
| 3459 | 3459 | |
| 3460 | -func newJSONDecoder() -> JSONDecoder { | |
| 3460 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 3461 | 3461 | let decoder = JSONDecoder() |
| 3462 | 3462 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 3463 | 3463 | let container = try decoder.singleValueContainer() |
| @@ -3480,7 +3480,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 3480 | 3480 | return decoder |
| 3481 | 3481 | } |
| 3482 | 3482 | |
| 3483 | -func newJSONEncoder() -> JSONEncoder { | |
| 3483 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 3484 | 3484 | let encoder = JSONEncoder() |
| 3485 | 3485 | let formatter = DateFormatter() |
| 3486 | 3486 | formatter.calendar = Calendar(identifier: .iso8601) |
Mswiftdefault / quicktype.swift+2 −2
| @@ -3075,7 +3075,7 @@ enum Protext: Codable { | ||
| 3075 | 3075 | |
| 3076 | 3076 | // MARK: - Helper functions for creating encoders and decoders |
| 3077 | 3077 | |
| 3078 | -func newJSONDecoder() -> JSONDecoder { | |
| 3078 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 3079 | 3079 | let decoder = JSONDecoder() |
| 3080 | 3080 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 3081 | 3081 | let container = try decoder.singleValueContainer() |
| @@ -3098,7 +3098,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 3098 | 3098 | return decoder |
| 3099 | 3099 | } |
| 3100 | 3100 | |
| 3101 | -func newJSONEncoder() -> JSONEncoder { | |
| 3101 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 3102 | 3102 | let encoder = JSONEncoder() |
| 3103 | 3103 | let formatter = DateFormatter() |
| 3104 | 3104 | formatter.calendar = Calendar(identifier: .iso8601) |
Mswiftdensity-dense--3bfb4c22cfd0 / quicktype.swift+2 −2
| @@ -2622,7 +2622,7 @@ enum Protext: Codable { | ||
| 2622 | 2622 | |
| 2623 | 2623 | // MARK: - Helper functions for creating encoders and decoders |
| 2624 | 2624 | |
| 2625 | -func newJSONDecoder() -> JSONDecoder { | |
| 2625 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 2626 | 2626 | let decoder = JSONDecoder() |
| 2627 | 2627 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 2628 | 2628 | let container = try decoder.singleValueContainer() |
| @@ -2645,7 +2645,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 2645 | 2645 | return decoder |
| 2646 | 2646 | } |
| 2647 | 2647 | |
| 2648 | -func newJSONEncoder() -> JSONEncoder { | |
| 2648 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 2649 | 2649 | let encoder = JSONEncoder() |
| 2650 | 2650 | let formatter = DateFormatter() |
| 2651 | 2651 | formatter.calendar = Calendar(identifier: .iso8601) |
Mswiftprotocol-equatable--bd9068f466c1 / quicktype.swift+2 −2
| @@ -3165,7 +3165,7 @@ enum Protext: Codable, Equatable { | ||
| 3165 | 3165 | |
| 3166 | 3166 | // MARK: - Helper functions for creating encoders and decoders |
| 3167 | 3167 | |
| 3168 | -func newJSONDecoder() -> JSONDecoder { | |
| 3168 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 3169 | 3169 | let decoder = JSONDecoder() |
| 3170 | 3170 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 3171 | 3171 | let container = try decoder.singleValueContainer() |
| @@ -3188,7 +3188,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 3188 | 3188 | return decoder |
| 3189 | 3189 | } |
| 3190 | 3190 | |
| 3191 | -func newJSONEncoder() -> JSONEncoder { | |
| 3191 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 3192 | 3192 | let encoder = JSONEncoder() |
| 3193 | 3193 | let formatter = DateFormatter() |
| 3194 | 3194 | formatter.calendar = Calendar(identifier: .iso8601) |
Mswiftstruct-or-class-class--238d6c8a12d4 / quicktype.swift+2 −2
| @@ -3472,7 +3472,7 @@ enum Protext: Codable { | ||
| 3472 | 3472 | |
| 3473 | 3473 | // MARK: - Helper functions for creating encoders and decoders |
| 3474 | 3474 | |
| 3475 | -func newJSONDecoder() -> JSONDecoder { | |
| 3475 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 3476 | 3476 | let decoder = JSONDecoder() |
| 3477 | 3477 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 3478 | 3478 | let container = try decoder.singleValueContainer() |
| @@ -3495,7 +3495,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 3495 | 3495 | return decoder |
| 3496 | 3496 | } |
| 3497 | 3497 | |
| 3498 | -func newJSONEncoder() -> JSONEncoder { | |
| 3498 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 3499 | 3499 | let encoder = JSONEncoder() |
| 3500 | 3500 | let formatter = DateFormatter() |
| 3501 | 3501 | formatter.calendar = Calendar(identifier: .iso8601) |
Mswiftsupport-linux-false--4bd8c552e09a / quicktype.swift+2 −2
| @@ -3075,7 +3075,7 @@ enum Protext: Codable { | ||
| 3075 | 3075 | |
| 3076 | 3076 | // MARK: - Helper functions for creating encoders and decoders |
| 3077 | 3077 | |
| 3078 | -func newJSONDecoder() -> JSONDecoder { | |
| 3078 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 3079 | 3079 | let decoder = JSONDecoder() |
| 3080 | 3080 | if #available(iOS 10.0, OSX 10.12, tvOS 10.0, watchOS 3.0, *) { |
| 3081 | 3081 | decoder.dateDecodingStrategy = .iso8601 |
| @@ -3083,7 +3083,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 3083 | 3083 | return decoder |
| 3084 | 3084 | } |
| 3085 | 3085 | |
| 3086 | -func newJSONEncoder() -> JSONEncoder { | |
| 3086 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 3087 | 3087 | let encoder = JSONEncoder() |
| 3088 | 3088 | if #available(iOS 10.0, OSX 10.12, tvOS 10.0, watchOS 3.0, *) { |
| 3089 | 3089 | encoder.dateEncodingStrategy = .iso8601 |
Test case
7 generated files · +14 −14test/inputs/json/priority/combinations4.json
Mswiftaccess-level-internal--a653a863c206 / quicktype.swift+2 −2
| @@ -3579,7 +3579,7 @@ extension WrothyClass { | ||
| 3579 | 3579 | |
| 3580 | 3580 | // MARK: - Helper functions for creating encoders and decoders |
| 3581 | 3581 | |
| 3582 | -func newJSONDecoder() -> JSONDecoder { | |
| 3582 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 3583 | 3583 | let decoder = JSONDecoder() |
| 3584 | 3584 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 3585 | 3585 | let container = try decoder.singleValueContainer() |
| @@ -3602,7 +3602,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 3602 | 3602 | return decoder |
| 3603 | 3603 | } |
| 3604 | 3604 | |
| 3605 | -func newJSONEncoder() -> JSONEncoder { | |
| 3605 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 3606 | 3606 | let encoder = JSONEncoder() |
| 3607 | 3607 | let formatter = DateFormatter() |
| 3608 | 3608 | formatter.calendar = Calendar(identifier: .iso8601) |
Mswiftaccess-level-public--bc6fc37ec004 / quicktype.swift+2 −2
| @@ -4017,7 +4017,7 @@ public extension WrothyClass { | ||
| 4017 | 4017 | |
| 4018 | 4018 | // MARK: - Helper functions for creating encoders and decoders |
| 4019 | 4019 | |
| 4020 | -func newJSONDecoder() -> JSONDecoder { | |
| 4020 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 4021 | 4021 | let decoder = JSONDecoder() |
| 4022 | 4022 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 4023 | 4023 | let container = try decoder.singleValueContainer() |
| @@ -4040,7 +4040,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 4040 | 4040 | return decoder |
| 4041 | 4041 | } |
| 4042 | 4042 | |
| 4043 | -func newJSONEncoder() -> JSONEncoder { | |
| 4043 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 4044 | 4044 | let encoder = JSONEncoder() |
| 4045 | 4045 | let formatter = DateFormatter() |
| 4046 | 4046 | formatter.calendar = Calendar(identifier: .iso8601) |
Mswiftdefault / quicktype.swift+2 −2
| @@ -3579,7 +3579,7 @@ extension WrothyClass { | ||
| 3579 | 3579 | |
| 3580 | 3580 | // MARK: - Helper functions for creating encoders and decoders |
| 3581 | 3581 | |
| 3582 | -func newJSONDecoder() -> JSONDecoder { | |
| 3582 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 3583 | 3583 | let decoder = JSONDecoder() |
| 3584 | 3584 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 3585 | 3585 | let container = try decoder.singleValueContainer() |
| @@ -3602,7 +3602,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 3602 | 3602 | return decoder |
| 3603 | 3603 | } |
| 3604 | 3604 | |
| 3605 | -func newJSONEncoder() -> JSONEncoder { | |
| 3605 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 3606 | 3606 | let encoder = JSONEncoder() |
| 3607 | 3607 | let formatter = DateFormatter() |
| 3608 | 3608 | formatter.calendar = Calendar(identifier: .iso8601) |
Mswiftdensity-dense--3bfb4c22cfd0 / quicktype.swift+2 −2
| @@ -3049,7 +3049,7 @@ extension WrothyClass { | ||
| 3049 | 3049 | |
| 3050 | 3050 | // MARK: - Helper functions for creating encoders and decoders |
| 3051 | 3051 | |
| 3052 | -func newJSONDecoder() -> JSONDecoder { | |
| 3052 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 3053 | 3053 | let decoder = JSONDecoder() |
| 3054 | 3054 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 3055 | 3055 | let container = try decoder.singleValueContainer() |
| @@ -3072,7 +3072,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 3072 | 3072 | return decoder |
| 3073 | 3073 | } |
| 3074 | 3074 | |
| 3075 | -func newJSONEncoder() -> JSONEncoder { | |
| 3075 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 3076 | 3076 | let encoder = JSONEncoder() |
| 3077 | 3077 | let formatter = DateFormatter() |
| 3078 | 3078 | formatter.calendar = Calendar(identifier: .iso8601) |
Mswiftprotocol-equatable--bd9068f466c1 / quicktype.swift+2 −2
| @@ -3681,7 +3681,7 @@ extension WrothyClass { | ||
| 3681 | 3681 | |
| 3682 | 3682 | // MARK: - Helper functions for creating encoders and decoders |
| 3683 | 3683 | |
| 3684 | -func newJSONDecoder() -> JSONDecoder { | |
| 3684 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 3685 | 3685 | let decoder = JSONDecoder() |
| 3686 | 3686 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 3687 | 3687 | let container = try decoder.singleValueContainer() |
| @@ -3704,7 +3704,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 3704 | 3704 | return decoder |
| 3705 | 3705 | } |
| 3706 | 3706 | |
| 3707 | -func newJSONEncoder() -> JSONEncoder { | |
| 3707 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 3708 | 3708 | let encoder = JSONEncoder() |
| 3709 | 3709 | let formatter = DateFormatter() |
| 3710 | 3710 | formatter.calendar = Calendar(identifier: .iso8601) |
Mswiftstruct-or-class-class--238d6c8a12d4 / quicktype.swift+2 −2
| @@ -4034,7 +4034,7 @@ extension WrothyClass { | ||
| 4034 | 4034 | |
| 4035 | 4035 | // MARK: - Helper functions for creating encoders and decoders |
| 4036 | 4036 | |
| 4037 | -func newJSONDecoder() -> JSONDecoder { | |
| 4037 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 4038 | 4038 | let decoder = JSONDecoder() |
| 4039 | 4039 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 4040 | 4040 | let container = try decoder.singleValueContainer() |
| @@ -4057,7 +4057,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 4057 | 4057 | return decoder |
| 4058 | 4058 | } |
| 4059 | 4059 | |
| 4060 | -func newJSONEncoder() -> JSONEncoder { | |
| 4060 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 4061 | 4061 | let encoder = JSONEncoder() |
| 4062 | 4062 | let formatter = DateFormatter() |
| 4063 | 4063 | formatter.calendar = Calendar(identifier: .iso8601) |
Mswiftsupport-linux-false--4bd8c552e09a / quicktype.swift+2 −2
| @@ -3579,7 +3579,7 @@ extension WrothyClass { | ||
| 3579 | 3579 | |
| 3580 | 3580 | // MARK: - Helper functions for creating encoders and decoders |
| 3581 | 3581 | |
| 3582 | -func newJSONDecoder() -> JSONDecoder { | |
| 3582 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 3583 | 3583 | let decoder = JSONDecoder() |
| 3584 | 3584 | if #available(iOS 10.0, OSX 10.12, tvOS 10.0, watchOS 3.0, *) { |
| 3585 | 3585 | decoder.dateDecodingStrategy = .iso8601 |
| @@ -3587,7 +3587,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 3587 | 3587 | return decoder |
| 3588 | 3588 | } |
| 3589 | 3589 | |
| 3590 | -func newJSONEncoder() -> JSONEncoder { | |
| 3590 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 3591 | 3591 | let encoder = JSONEncoder() |
| 3592 | 3592 | if #available(iOS 10.0, OSX 10.12, tvOS 10.0, watchOS 3.0, *) { |
| 3593 | 3593 | encoder.dateEncodingStrategy = .iso8601 |
Test case
1 generated file · +2 −2test/inputs/json/priority/combined-enum.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -105,7 +105,7 @@ enum X: String, Codable { | ||
| 105 | 105 | |
| 106 | 106 | // MARK: - Helper functions for creating encoders and decoders |
| 107 | 107 | |
| 108 | -func newJSONDecoder() -> JSONDecoder { | |
| 108 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 109 | 109 | let decoder = JSONDecoder() |
| 110 | 110 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 111 | 111 | let container = try decoder.singleValueContainer() |
| @@ -128,7 +128,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 128 | 128 | return decoder |
| 129 | 129 | } |
| 130 | 130 | |
| 131 | -func newJSONEncoder() -> JSONEncoder { | |
| 131 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 132 | 132 | let encoder = JSONEncoder() |
| 133 | 133 | let formatter = DateFormatter() |
| 134 | 134 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/priority/direct-recursive.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -76,7 +76,7 @@ extension TopLevel { | ||
| 76 | 76 | |
| 77 | 77 | // MARK: - Helper functions for creating encoders and decoders |
| 78 | 78 | |
| 79 | -func newJSONDecoder() -> JSONDecoder { | |
| 79 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 80 | 80 | let decoder = JSONDecoder() |
| 81 | 81 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 82 | 82 | let container = try decoder.singleValueContainer() |
| @@ -99,7 +99,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 99 | 99 | return decoder |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | -func newJSONEncoder() -> JSONEncoder { | |
| 102 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 103 | 103 | let encoder = JSONEncoder() |
| 104 | 104 | let formatter = DateFormatter() |
| 105 | 105 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/priority/empty-enum.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -95,7 +95,7 @@ extension Foo { | ||
| 95 | 95 | |
| 96 | 96 | // MARK: - Helper functions for creating encoders and decoders |
| 97 | 97 | |
| 98 | -func newJSONDecoder() -> JSONDecoder { | |
| 98 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 99 | 99 | let decoder = JSONDecoder() |
| 100 | 100 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 101 | 101 | let container = try decoder.singleValueContainer() |
| @@ -118,7 +118,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 118 | 118 | return decoder |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | -func newJSONEncoder() -> JSONEncoder { | |
| 121 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 122 | 122 | let encoder = JSONEncoder() |
| 123 | 123 | let formatter = DateFormatter() |
| 124 | 124 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/priority/identifiers.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -340,7 +340,7 @@ extension EmptyClass { | ||
| 340 | 340 | |
| 341 | 341 | // MARK: - Helper functions for creating encoders and decoders |
| 342 | 342 | |
| 343 | -func newJSONDecoder() -> JSONDecoder { | |
| 343 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 344 | 344 | let decoder = JSONDecoder() |
| 345 | 345 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 346 | 346 | let container = try decoder.singleValueContainer() |
| @@ -363,7 +363,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 363 | 363 | return decoder |
| 364 | 364 | } |
| 365 | 365 | |
| 366 | -func newJSONEncoder() -> JSONEncoder { | |
| 366 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 367 | 367 | let encoder = JSONEncoder() |
| 368 | 368 | let formatter = DateFormatter() |
| 369 | 369 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/priority/issue2680-object-array.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -78,7 +78,7 @@ extension Array where Element == TopLevel.Element { | ||
| 78 | 78 | |
| 79 | 79 | // MARK: - Helper functions for creating encoders and decoders |
| 80 | 80 | |
| 81 | -func newJSONDecoder() -> JSONDecoder { | |
| 81 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 82 | 82 | let decoder = JSONDecoder() |
| 83 | 83 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 84 | 84 | let container = try decoder.singleValueContainer() |
| @@ -101,7 +101,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 101 | 101 | return decoder |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | -func newJSONEncoder() -> JSONEncoder { | |
| 104 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 105 | 105 | let encoder = JSONEncoder() |
| 106 | 106 | let formatter = DateFormatter() |
| 107 | 107 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/priority/issue2680-scalar-array.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -33,7 +33,7 @@ extension Array where Element == TopLevel.Element { | ||
| 33 | 33 | |
| 34 | 34 | // MARK: - Helper functions for creating encoders and decoders |
| 35 | 35 | |
| 36 | -func newJSONDecoder() -> JSONDecoder { | |
| 36 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 37 | 37 | let decoder = JSONDecoder() |
| 38 | 38 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 39 | 39 | let container = try decoder.singleValueContainer() |
| @@ -56,7 +56,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 56 | 56 | return decoder |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | -func newJSONEncoder() -> JSONEncoder { | |
| 59 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 60 | 60 | let encoder = JSONEncoder() |
| 61 | 61 | let formatter = DateFormatter() |
| 62 | 62 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/priority/keywords.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -13683,7 +13683,7 @@ extension Yield { | ||
| 13683 | 13683 | |
| 13684 | 13684 | // MARK: - Helper functions for creating encoders and decoders |
| 13685 | 13685 | |
| 13686 | -func newJSONDecoder() -> JSONDecoder { | |
| 13686 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 13687 | 13687 | let decoder = JSONDecoder() |
| 13688 | 13688 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 13689 | 13689 | let container = try decoder.singleValueContainer() |
| @@ -13706,7 +13706,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 13706 | 13706 | return decoder |
| 13707 | 13707 | } |
| 13708 | 13708 | |
| 13709 | -func newJSONEncoder() -> JSONEncoder { | |
| 13709 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 13710 | 13710 | let encoder = JSONEncoder() |
| 13711 | 13711 | let formatter = DateFormatter() |
| 13712 | 13712 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/priority/kotlin-enum-class-case-collision.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -83,7 +83,7 @@ extension Array where Element == TopLevel.Element { | ||
| 83 | 83 | |
| 84 | 84 | // MARK: - Helper functions for creating encoders and decoders |
| 85 | 85 | |
| 86 | -func newJSONDecoder() -> JSONDecoder { | |
| 86 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 87 | 87 | let decoder = JSONDecoder() |
| 88 | 88 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 89 | 89 | let container = try decoder.singleValueContainer() |
| @@ -106,7 +106,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 106 | 106 | return decoder |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | -func newJSONEncoder() -> JSONEncoder { | |
| 109 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 110 | 110 | let encoder = JSONEncoder() |
| 111 | 111 | let formatter = DateFormatter() |
| 112 | 112 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/priority/list.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -61,7 +61,7 @@ extension TopLevel { | ||
| 61 | 61 | |
| 62 | 62 | // MARK: - Helper functions for creating encoders and decoders |
| 63 | 63 | |
| 64 | -func newJSONDecoder() -> JSONDecoder { | |
| 64 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 65 | 65 | let decoder = JSONDecoder() |
| 66 | 66 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 67 | 67 | let container = try decoder.singleValueContainer() |
| @@ -84,7 +84,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 84 | 84 | return decoder |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | -func newJSONEncoder() -> JSONEncoder { | |
| 87 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 88 | 88 | let encoder = JSONEncoder() |
| 89 | 89 | let formatter = DateFormatter() |
| 90 | 90 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/priority/name-style.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -75,7 +75,7 @@ extension TopLevel { | ||
| 75 | 75 | |
| 76 | 76 | // MARK: - Helper functions for creating encoders and decoders |
| 77 | 77 | |
| 78 | -func newJSONDecoder() -> JSONDecoder { | |
| 78 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 79 | 79 | let decoder = JSONDecoder() |
| 80 | 80 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 81 | 81 | let container = try decoder.singleValueContainer() |
| @@ -98,7 +98,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 98 | 98 | return decoder |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | -func newJSONEncoder() -> JSONEncoder { | |
| 101 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 102 | 102 | let encoder = JSONEncoder() |
| 103 | 103 | let formatter = DateFormatter() |
| 104 | 104 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/priority/nbl-stats.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -1555,7 +1555,7 @@ extension Totallds { | ||
| 1555 | 1555 | |
| 1556 | 1556 | // MARK: - Helper functions for creating encoders and decoders |
| 1557 | 1557 | |
| 1558 | -func newJSONDecoder() -> JSONDecoder { | |
| 1558 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 1559 | 1559 | let decoder = JSONDecoder() |
| 1560 | 1560 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 1561 | 1561 | let container = try decoder.singleValueContainer() |
| @@ -1578,7 +1578,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 1578 | 1578 | return decoder |
| 1579 | 1579 | } |
| 1580 | 1580 | |
| 1581 | -func newJSONEncoder() -> JSONEncoder { | |
| 1581 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 1582 | 1582 | let encoder = JSONEncoder() |
| 1583 | 1583 | let formatter = DateFormatter() |
| 1584 | 1584 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/priority/nested-objects.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -55,7 +55,7 @@ extension TopLevel { | ||
| 55 | 55 | |
| 56 | 56 | // MARK: - Helper functions for creating encoders and decoders |
| 57 | 57 | |
| 58 | -func newJSONDecoder() -> JSONDecoder { | |
| 58 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 59 | 59 | let decoder = JSONDecoder() |
| 60 | 60 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 61 | 61 | let container = try decoder.singleValueContainer() |
| @@ -78,7 +78,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 78 | 78 | return decoder |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | -func newJSONEncoder() -> JSONEncoder { | |
| 81 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 82 | 82 | let encoder = JSONEncoder() |
| 83 | 83 | let formatter = DateFormatter() |
| 84 | 84 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/priority/number-map.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -51,7 +51,7 @@ extension TopLevel { | ||
| 51 | 51 | |
| 52 | 52 | // MARK: - Helper functions for creating encoders and decoders |
| 53 | 53 | |
| 54 | -func newJSONDecoder() -> JSONDecoder { | |
| 54 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 55 | 55 | let decoder = JSONDecoder() |
| 56 | 56 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 57 | 57 | let container = try decoder.singleValueContainer() |
| @@ -74,7 +74,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 74 | 74 | return decoder |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | -func newJSONEncoder() -> JSONEncoder { | |
| 77 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 78 | 78 | let encoder = JSONEncoder() |
| 79 | 79 | let formatter = DateFormatter() |
| 80 | 80 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/priority/omit-empty.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -99,7 +99,7 @@ extension Result { | ||
| 99 | 99 | |
| 100 | 100 | // MARK: - Helper functions for creating encoders and decoders |
| 101 | 101 | |
| 102 | -func newJSONDecoder() -> JSONDecoder { | |
| 102 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 103 | 103 | let decoder = JSONDecoder() |
| 104 | 104 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 105 | 105 | let container = try decoder.singleValueContainer() |
| @@ -122,7 +122,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 122 | 122 | return decoder |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | -func newJSONEncoder() -> JSONEncoder { | |
| 125 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 126 | 126 | let encoder = JSONEncoder() |
| 127 | 127 | let formatter = DateFormatter() |
| 128 | 128 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/priority/optional-union.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -106,7 +106,7 @@ extension Array where Element == TopLevel.Element { | ||
| 106 | 106 | |
| 107 | 107 | // MARK: - Helper functions for creating encoders and decoders |
| 108 | 108 | |
| 109 | -func newJSONDecoder() -> JSONDecoder { | |
| 109 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 110 | 110 | let decoder = JSONDecoder() |
| 111 | 111 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 112 | 112 | let container = try decoder.singleValueContainer() |
| @@ -129,7 +129,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 129 | 129 | return decoder |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | -func newJSONEncoder() -> JSONEncoder { | |
| 132 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 133 | 133 | let encoder = JSONEncoder() |
| 134 | 134 | let formatter = DateFormatter() |
| 135 | 135 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/priority/php-mixed-union.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -144,7 +144,7 @@ extension MixedClass { | ||
| 144 | 144 | |
| 145 | 145 | // MARK: - Helper functions for creating encoders and decoders |
| 146 | 146 | |
| 147 | -func newJSONDecoder() -> JSONDecoder { | |
| 147 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 148 | 148 | let decoder = JSONDecoder() |
| 149 | 149 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 150 | 150 | let container = try decoder.singleValueContainer() |
| @@ -167,7 +167,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 167 | 167 | return decoder |
| 168 | 168 | } |
| 169 | 169 | |
| 170 | -func newJSONEncoder() -> JSONEncoder { | |
| 170 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 171 | 171 | let encoder = JSONEncoder() |
| 172 | 172 | let formatter = DateFormatter() |
| 173 | 173 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/priority/php-validation.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -67,7 +67,7 @@ extension TopLevel { | ||
| 67 | 67 | |
| 68 | 68 | // MARK: - Helper functions for creating encoders and decoders |
| 69 | 69 | |
| 70 | -func newJSONDecoder() -> JSONDecoder { | |
| 70 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 71 | 71 | let decoder = JSONDecoder() |
| 72 | 72 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 73 | 73 | let container = try decoder.singleValueContainer() |
| @@ -90,7 +90,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 90 | 90 | return decoder |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | -func newJSONEncoder() -> JSONEncoder { | |
| 93 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 94 | 94 | let encoder = JSONEncoder() |
| 95 | 95 | let formatter = DateFormatter() |
| 96 | 96 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/priority/recursive.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -975,7 +975,7 @@ extension FormatsClass { | ||
| 975 | 975 | |
| 976 | 976 | // MARK: - Helper functions for creating encoders and decoders |
| 977 | 977 | |
| 978 | -func newJSONDecoder() -> JSONDecoder { | |
| 978 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 979 | 979 | let decoder = JSONDecoder() |
| 980 | 980 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 981 | 981 | let container = try decoder.singleValueContainer() |
| @@ -998,7 +998,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 998 | 998 | return decoder |
| 999 | 999 | } |
| 1000 | 1000 | |
| 1001 | -func newJSONEncoder() -> JSONEncoder { | |
| 1001 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 1002 | 1002 | let encoder = JSONEncoder() |
| 1003 | 1003 | let formatter = DateFormatter() |
| 1004 | 1004 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/priority/simple-identifiers.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -83,7 +83,7 @@ extension TopLevel { | ||
| 83 | 83 | |
| 84 | 84 | // MARK: - Helper functions for creating encoders and decoders |
| 85 | 85 | |
| 86 | -func newJSONDecoder() -> JSONDecoder { | |
| 86 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 87 | 87 | let decoder = JSONDecoder() |
| 88 | 88 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 89 | 89 | let container = try decoder.singleValueContainer() |
| @@ -106,7 +106,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 106 | 106 | return decoder |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | -func newJSONEncoder() -> JSONEncoder { | |
| 109 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 110 | 110 | let encoder = JSONEncoder() |
| 111 | 111 | let formatter = DateFormatter() |
| 112 | 112 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/priority/union-constructor-clash.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -127,7 +127,7 @@ enum Union: Codable { | ||
| 127 | 127 | |
| 128 | 128 | // MARK: - Helper functions for creating encoders and decoders |
| 129 | 129 | |
| 130 | -func newJSONDecoder() -> JSONDecoder { | |
| 130 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 131 | 131 | let decoder = JSONDecoder() |
| 132 | 132 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 133 | 133 | let container = try decoder.singleValueContainer() |
| @@ -150,7 +150,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 150 | 150 | return decoder |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | -func newJSONEncoder() -> JSONEncoder { | |
| 153 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 154 | 154 | let encoder = JSONEncoder() |
| 155 | 155 | let formatter = DateFormatter() |
| 156 | 156 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/priority/unions.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -173,7 +173,7 @@ extension ZClass { | ||
| 173 | 173 | |
| 174 | 174 | // MARK: - Helper functions for creating encoders and decoders |
| 175 | 175 | |
| 176 | -func newJSONDecoder() -> JSONDecoder { | |
| 176 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 177 | 177 | let decoder = JSONDecoder() |
| 178 | 178 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 179 | 179 | let container = try decoder.singleValueContainer() |
| @@ -196,7 +196,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 196 | 196 | return decoder |
| 197 | 197 | } |
| 198 | 198 | |
| 199 | -func newJSONEncoder() -> JSONEncoder { | |
| 199 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 200 | 200 | let encoder = JSONEncoder() |
| 201 | 201 | let formatter = DateFormatter() |
| 202 | 202 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/priority/url.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -55,7 +55,7 @@ extension TopLevel { | ||
| 55 | 55 | |
| 56 | 56 | // MARK: - Helper functions for creating encoders and decoders |
| 57 | 57 | |
| 58 | -func newJSONDecoder() -> JSONDecoder { | |
| 58 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 59 | 59 | let decoder = JSONDecoder() |
| 60 | 60 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 61 | 61 | let container = try decoder.singleValueContainer() |
| @@ -78,7 +78,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 78 | 78 | return decoder |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | -func newJSONEncoder() -> JSONEncoder { | |
| 81 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 82 | 82 | let encoder = JSONEncoder() |
| 83 | 83 | let formatter = DateFormatter() |
| 84 | 84 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/priority/uuids.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -71,7 +71,7 @@ extension TopLevel { | ||
| 71 | 71 | |
| 72 | 72 | // MARK: - Helper functions for creating encoders and decoders |
| 73 | 73 | |
| 74 | -func newJSONDecoder() -> JSONDecoder { | |
| 74 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 75 | 75 | let decoder = JSONDecoder() |
| 76 | 76 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 77 | 77 | let container = try decoder.singleValueContainer() |
| @@ -94,7 +94,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 94 | 94 | return decoder |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | -func newJSONEncoder() -> JSONEncoder { | |
| 97 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 98 | 98 | let encoder = JSONEncoder() |
| 99 | 99 | let formatter = DateFormatter() |
| 100 | 100 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/samples/bitcoin-block.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -67,7 +67,7 @@ extension TopLevel { | ||
| 67 | 67 | |
| 68 | 68 | // MARK: - Helper functions for creating encoders and decoders |
| 69 | 69 | |
| 70 | -func newJSONDecoder() -> JSONDecoder { | |
| 70 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 71 | 71 | let decoder = JSONDecoder() |
| 72 | 72 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 73 | 73 | let container = try decoder.singleValueContainer() |
| @@ -90,7 +90,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 90 | 90 | return decoder |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | -func newJSONEncoder() -> JSONEncoder { | |
| 93 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 94 | 94 | let encoder = JSONEncoder() |
| 95 | 95 | let formatter = DateFormatter() |
| 96 | 96 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/samples/getting-started.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -55,7 +55,7 @@ extension TopLevel { | ||
| 55 | 55 | |
| 56 | 56 | // MARK: - Helper functions for creating encoders and decoders |
| 57 | 57 | |
| 58 | -func newJSONDecoder() -> JSONDecoder { | |
| 58 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 59 | 59 | let decoder = JSONDecoder() |
| 60 | 60 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 61 | 61 | let container = try decoder.singleValueContainer() |
| @@ -78,7 +78,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 78 | 78 | return decoder |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | -func newJSONEncoder() -> JSONEncoder { | |
| 81 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 82 | 82 | let encoder = JSONEncoder() |
| 83 | 83 | let formatter = DateFormatter() |
| 84 | 84 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/samples/github-events.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -1659,7 +1659,7 @@ extension Array where Element == TopLevel.Element { | ||
| 1659 | 1659 | |
| 1660 | 1660 | // MARK: - Helper functions for creating encoders and decoders |
| 1661 | 1661 | |
| 1662 | -func newJSONDecoder() -> JSONDecoder { | |
| 1662 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 1663 | 1663 | let decoder = JSONDecoder() |
| 1664 | 1664 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 1665 | 1665 | let container = try decoder.singleValueContainer() |
| @@ -1682,7 +1682,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 1682 | 1682 | return decoder |
| 1683 | 1683 | } |
| 1684 | 1684 | |
| 1685 | -func newJSONEncoder() -> JSONEncoder { | |
| 1685 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 1686 | 1686 | let encoder = JSONEncoder() |
| 1687 | 1687 | let formatter = DateFormatter() |
| 1688 | 1688 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/samples/kitchen-sink.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -310,7 +310,7 @@ extension PurplePerson { | ||
| 310 | 310 | |
| 311 | 311 | // MARK: - Helper functions for creating encoders and decoders |
| 312 | 312 | |
| 313 | -func newJSONDecoder() -> JSONDecoder { | |
| 313 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 314 | 314 | let decoder = JSONDecoder() |
| 315 | 315 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 316 | 316 | let container = try decoder.singleValueContainer() |
| @@ -333,7 +333,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 333 | 333 | return decoder |
| 334 | 334 | } |
| 335 | 335 | |
| 336 | -func newJSONEncoder() -> JSONEncoder { | |
| 336 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 337 | 337 | let encoder = JSONEncoder() |
| 338 | 338 | let formatter = DateFormatter() |
| 339 | 339 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
3 generated files · +6 −6test/inputs/json/samples/pokedex.json
Mswift-sendable-objective-cdefault / quicktype.swift+2 −2
| @@ -268,7 +268,7 @@ enum TypeElement: String, Codable, Sendable { | ||
| 268 | 268 | |
| 269 | 269 | // MARK: - Helper functions for creating encoders and decoders |
| 270 | 270 | |
| 271 | -func newJSONDecoder() -> JSONDecoder { | |
| 271 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 272 | 272 | let decoder = JSONDecoder() |
| 273 | 273 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 274 | 274 | let container = try decoder.singleValueContainer() |
| @@ -291,7 +291,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 291 | 291 | return decoder |
| 292 | 292 | } |
| 293 | 293 | |
| 294 | -func newJSONEncoder() -> JSONEncoder { | |
| 294 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 295 | 295 | let encoder = JSONEncoder() |
| 296 | 296 | let formatter = DateFormatter() |
| 297 | 297 | formatter.calendar = Calendar(identifier: .iso8601) |
Mswift-sendable-objective-cstruct-or-class-struct--aa0cc2601d8a / quicktype.swift+2 −2
| @@ -236,7 +236,7 @@ enum TypeElement: String, Codable, Sendable { | ||
| 236 | 236 | |
| 237 | 237 | // MARK: - Helper functions for creating encoders and decoders |
| 238 | 238 | |
| 239 | -func newJSONDecoder() -> JSONDecoder { | |
| 239 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 240 | 240 | let decoder = JSONDecoder() |
| 241 | 241 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 242 | 242 | let container = try decoder.singleValueContainer() |
| @@ -259,7 +259,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 259 | 259 | return decoder |
| 260 | 260 | } |
| 261 | 261 | |
| 262 | -func newJSONEncoder() -> JSONEncoder { | |
| 262 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 263 | 263 | let encoder = JSONEncoder() |
| 264 | 264 | let formatter = DateFormatter() |
| 265 | 265 | formatter.calendar = Calendar(identifier: .iso8601) |
Mswiftdefault / quicktype.swift+2 −2
| @@ -236,7 +236,7 @@ enum TypeElement: String, Codable { | ||
| 236 | 236 | |
| 237 | 237 | // MARK: - Helper functions for creating encoders and decoders |
| 238 | 238 | |
| 239 | -func newJSONDecoder() -> JSONDecoder { | |
| 239 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 240 | 240 | let decoder = JSONDecoder() |
| 241 | 241 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 242 | 242 | let container = try decoder.singleValueContainer() |
| @@ -259,7 +259,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 259 | 259 | return decoder |
| 260 | 260 | } |
| 261 | 261 | |
| 262 | -func newJSONEncoder() -> JSONEncoder { | |
| 262 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 263 | 263 | let encoder = JSONEncoder() |
| 264 | 264 | let formatter = DateFormatter() |
| 265 | 265 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/samples/reddit.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -788,7 +788,7 @@ enum Kind: String, Codable { | ||
| 788 | 788 | |
| 789 | 789 | // MARK: - Helper functions for creating encoders and decoders |
| 790 | 790 | |
| 791 | -func newJSONDecoder() -> JSONDecoder { | |
| 791 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 792 | 792 | let decoder = JSONDecoder() |
| 793 | 793 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 794 | 794 | let container = try decoder.singleValueContainer() |
| @@ -811,7 +811,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 811 | 811 | return decoder |
| 812 | 812 | } |
| 813 | 813 | |
| 814 | -func newJSONEncoder() -> JSONEncoder { | |
| 814 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 815 | 815 | let encoder = JSONEncoder() |
| 816 | 816 | let formatter = DateFormatter() |
| 817 | 817 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
3 generated files · +6 −6test/inputs/json/samples/simple-object.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -59,7 +59,7 @@ extension TopLevel { | ||
| 59 | 59 | |
| 60 | 60 | // MARK: - Helper functions for creating encoders and decoders |
| 61 | 61 | |
| 62 | -func newJSONDecoder() -> JSONDecoder { | |
| 62 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 63 | 63 | let decoder = JSONDecoder() |
| 64 | 64 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 65 | 65 | let container = try decoder.singleValueContainer() |
| @@ -82,7 +82,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 82 | 82 | return decoder |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | -func newJSONEncoder() -> JSONEncoder { | |
| 85 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 86 | 86 | let encoder = JSONEncoder() |
| 87 | 87 | let formatter = DateFormatter() |
| 88 | 88 | formatter.calendar = Calendar(identifier: .iso8601) |
Mswiftfinal-classes-true__struct-or-class-class--d3c62ec7414d / quicktype.swift+2 −2
| @@ -66,7 +66,7 @@ extension TopLevel { | ||
| 66 | 66 | |
| 67 | 67 | // MARK: - Helper functions for creating encoders and decoders |
| 68 | 68 | |
| 69 | -func newJSONDecoder() -> JSONDecoder { | |
| 69 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 70 | 70 | let decoder = JSONDecoder() |
| 71 | 71 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 72 | 72 | let container = try decoder.singleValueContainer() |
| @@ -89,7 +89,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 89 | 89 | return decoder |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | -func newJSONEncoder() -> JSONEncoder { | |
| 92 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 93 | 93 | let encoder = JSONEncoder() |
| 94 | 94 | let formatter = DateFormatter() |
| 95 | 95 | formatter.calendar = Calendar(identifier: .iso8601) |
Mswiftprotocol-hashable--739b516c7897 / quicktype.swift+2 −2
| @@ -65,7 +65,7 @@ extension TopLevel { | ||
| 65 | 65 | |
| 66 | 66 | // MARK: - Helper functions for creating encoders and decoders |
| 67 | 67 | |
| 68 | -func newJSONDecoder() -> JSONDecoder { | |
| 68 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 69 | 69 | let decoder = JSONDecoder() |
| 70 | 70 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 71 | 71 | let container = try decoder.singleValueContainer() |
| @@ -88,7 +88,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 88 | 88 | return decoder |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | -func newJSONEncoder() -> JSONEncoder { | |
| 91 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 92 | 92 | let encoder = JSONEncoder() |
| 93 | 93 | let formatter = DateFormatter() |
| 94 | 94 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/samples/spotify-album.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -527,7 +527,7 @@ extension Item { | ||
| 527 | 527 | |
| 528 | 528 | // MARK: - Helper functions for creating encoders and decoders |
| 529 | 529 | |
| 530 | -func newJSONDecoder() -> JSONDecoder { | |
| 530 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 531 | 531 | let decoder = JSONDecoder() |
| 532 | 532 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 533 | 533 | let container = try decoder.singleValueContainer() |
| @@ -550,7 +550,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 550 | 550 | return decoder |
| 551 | 551 | } |
| 552 | 552 | |
| 553 | -func newJSONEncoder() -> JSONEncoder { | |
| 553 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 554 | 554 | let encoder = JSONEncoder() |
| 555 | 555 | let formatter = DateFormatter() |
| 556 | 556 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/samples/us-avg-temperatures.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -159,7 +159,7 @@ extension Description { | ||
| 159 | 159 | |
| 160 | 160 | // MARK: - Helper functions for creating encoders and decoders |
| 161 | 161 | |
| 162 | -func newJSONDecoder() -> JSONDecoder { | |
| 162 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 163 | 163 | let decoder = JSONDecoder() |
| 164 | 164 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 165 | 165 | let container = try decoder.singleValueContainer() |
| @@ -182,7 +182,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 182 | 182 | return decoder |
| 183 | 183 | } |
| 184 | 184 | |
| 185 | -func newJSONEncoder() -> JSONEncoder { | |
| 185 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 186 | 186 | let encoder = JSONEncoder() |
| 187 | 187 | let formatter = DateFormatter() |
| 188 | 188 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/json/samples/us-senators.json
Mswiftdefault / quicktype.swift+2 −2
| @@ -459,7 +459,7 @@ enum Title: String, Codable { | ||
| 459 | 459 | |
| 460 | 460 | // MARK: - Helper functions for creating encoders and decoders |
| 461 | 461 | |
| 462 | -func newJSONDecoder() -> JSONDecoder { | |
| 462 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 463 | 463 | let decoder = JSONDecoder() |
| 464 | 464 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 465 | 465 | let container = try decoder.singleValueContainer() |
| @@ -482,7 +482,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 482 | 482 | return decoder |
| 483 | 483 | } |
| 484 | 484 | |
| 485 | -func newJSONEncoder() -> JSONEncoder { | |
| 485 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 486 | 486 | let encoder = JSONEncoder() |
| 487 | 487 | let formatter = DateFormatter() |
| 488 | 488 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/accessors.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -97,7 +97,7 @@ enum Union: Codable { | ||
| 97 | 97 | |
| 98 | 98 | // MARK: - Helper functions for creating encoders and decoders |
| 99 | 99 | |
| 100 | -func newJSONDecoder() -> JSONDecoder { | |
| 100 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 101 | 101 | let decoder = JSONDecoder() |
| 102 | 102 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 103 | 103 | let container = try decoder.singleValueContainer() |
| @@ -120,7 +120,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 120 | 120 | return decoder |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | -func newJSONEncoder() -> JSONEncoder { | |
| 123 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 124 | 124 | let encoder = JSONEncoder() |
| 125 | 125 | let formatter = DateFormatter() |
| 126 | 126 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/any.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -55,7 +55,7 @@ extension TopLevel { | ||
| 55 | 55 | |
| 56 | 56 | // MARK: - Helper functions for creating encoders and decoders |
| 57 | 57 | |
| 58 | -func newJSONDecoder() -> JSONDecoder { | |
| 58 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 59 | 59 | let decoder = JSONDecoder() |
| 60 | 60 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 61 | 61 | let container = try decoder.singleValueContainer() |
| @@ -78,7 +78,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 78 | 78 | return decoder |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | -func newJSONEncoder() -> JSONEncoder { | |
| 81 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 82 | 82 | let encoder = JSONEncoder() |
| 83 | 83 | let formatter = DateFormatter() |
| 84 | 84 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/bool-string.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -103,7 +103,7 @@ enum UnionWithBool: Codable { | ||
| 103 | 103 | |
| 104 | 104 | // MARK: - Helper functions for creating encoders and decoders |
| 105 | 105 | |
| 106 | -func newJSONDecoder() -> JSONDecoder { | |
| 106 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 107 | 107 | let decoder = JSONDecoder() |
| 108 | 108 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 109 | 109 | let container = try decoder.singleValueContainer() |
| @@ -126,7 +126,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 126 | 126 | return decoder |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | -func newJSONEncoder() -> JSONEncoder { | |
| 129 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 130 | 130 | let encoder = JSONEncoder() |
| 131 | 131 | let formatter = DateFormatter() |
| 132 | 132 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/boolean-subschema.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -63,7 +63,7 @@ extension TopLevel { | ||
| 63 | 63 | |
| 64 | 64 | // MARK: - Helper functions for creating encoders and decoders |
| 65 | 65 | |
| 66 | -func newJSONDecoder() -> JSONDecoder { | |
| 66 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 67 | 67 | let decoder = JSONDecoder() |
| 68 | 68 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 69 | 69 | let container = try decoder.singleValueContainer() |
| @@ -86,7 +86,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 86 | 86 | return decoder |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | -func newJSONEncoder() -> JSONEncoder { | |
| 89 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 90 | 90 | let encoder = JSONEncoder() |
| 91 | 91 | let formatter = DateFormatter() |
| 92 | 92 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/camelCase.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -55,7 +55,7 @@ extension TopLevel { | ||
| 55 | 55 | |
| 56 | 56 | // MARK: - Helper functions for creating encoders and decoders |
| 57 | 57 | |
| 58 | -func newJSONDecoder() -> JSONDecoder { | |
| 58 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 59 | 59 | let decoder = JSONDecoder() |
| 60 | 60 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 61 | 61 | let container = try decoder.singleValueContainer() |
| @@ -78,7 +78,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 78 | 78 | return decoder |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | -func newJSONEncoder() -> JSONEncoder { | |
| 81 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 82 | 82 | let encoder = JSONEncoder() |
| 83 | 83 | let formatter = DateFormatter() |
| 84 | 84 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/comment-injection-enum-nested-comment.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -63,7 +63,7 @@ enum Kind: String, Codable { | ||
| 63 | 63 | |
| 64 | 64 | // MARK: - Helper functions for creating encoders and decoders |
| 65 | 65 | |
| 66 | -func newJSONDecoder() -> JSONDecoder { | |
| 66 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 67 | 67 | let decoder = JSONDecoder() |
| 68 | 68 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 69 | 69 | let container = try decoder.singleValueContainer() |
| @@ -86,7 +86,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 86 | 86 | return decoder |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | -func newJSONEncoder() -> JSONEncoder { | |
| 89 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 90 | 90 | let encoder = JSONEncoder() |
| 91 | 91 | let formatter = DateFormatter() |
| 92 | 92 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/comment-injection-enum.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -69,7 +69,7 @@ enum Kind: String, Codable { | ||
| 69 | 69 | |
| 70 | 70 | // MARK: - Helper functions for creating encoders and decoders |
| 71 | 71 | |
| 72 | -func newJSONDecoder() -> JSONDecoder { | |
| 72 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 73 | 73 | let decoder = JSONDecoder() |
| 74 | 74 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 75 | 75 | let container = try decoder.singleValueContainer() |
| @@ -92,7 +92,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 92 | 92 | return decoder |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | -func newJSONEncoder() -> JSONEncoder { | |
| 95 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 96 | 96 | let encoder = JSONEncoder() |
| 97 | 97 | let formatter = DateFormatter() |
| 98 | 98 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/comment-injection-nested-comment.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -59,7 +59,7 @@ extension TopLevel { | ||
| 59 | 59 | |
| 60 | 60 | // MARK: - Helper functions for creating encoders and decoders |
| 61 | 61 | |
| 62 | -func newJSONDecoder() -> JSONDecoder { | |
| 62 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 63 | 63 | let decoder = JSONDecoder() |
| 64 | 64 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 65 | 65 | let container = try decoder.singleValueContainer() |
| @@ -82,7 +82,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 82 | 82 | return decoder |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | -func newJSONEncoder() -> JSONEncoder { | |
| 85 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 86 | 86 | let encoder = JSONEncoder() |
| 87 | 87 | let formatter = DateFormatter() |
| 88 | 88 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/comment-injection.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -90,7 +90,7 @@ extension TopLevel { | ||
| 90 | 90 | |
| 91 | 91 | // MARK: - Helper functions for creating encoders and decoders |
| 92 | 92 | |
| 93 | -func newJSONDecoder() -> JSONDecoder { | |
| 93 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 94 | 94 | let decoder = JSONDecoder() |
| 95 | 95 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 96 | 96 | let container = try decoder.singleValueContainer() |
| @@ -113,7 +113,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 113 | 113 | return decoder |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | -func newJSONEncoder() -> JSONEncoder { | |
| 116 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 117 | 117 | let encoder = JSONEncoder() |
| 118 | 118 | let formatter = DateFormatter() |
| 119 | 119 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/constructor.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -116,7 +116,7 @@ extension Constructor { | ||
| 116 | 116 | |
| 117 | 117 | // MARK: - Helper functions for creating encoders and decoders |
| 118 | 118 | |
| 119 | -func newJSONDecoder() -> JSONDecoder { | |
| 119 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 120 | 120 | let decoder = JSONDecoder() |
| 121 | 121 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 122 | 122 | let container = try decoder.singleValueContainer() |
| @@ -139,7 +139,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 139 | 139 | return decoder |
| 140 | 140 | } |
| 141 | 141 | |
| 142 | -func newJSONEncoder() -> JSONEncoder { | |
| 142 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 143 | 143 | let encoder = JSONEncoder() |
| 144 | 144 | let formatter = DateFormatter() |
| 145 | 145 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/cut-enum.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -51,7 +51,7 @@ extension TopLevel { | ||
| 51 | 51 | |
| 52 | 52 | // MARK: - Helper functions for creating encoders and decoders |
| 53 | 53 | |
| 54 | -func newJSONDecoder() -> JSONDecoder { | |
| 54 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 55 | 55 | let decoder = JSONDecoder() |
| 56 | 56 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 57 | 57 | let container = try decoder.singleValueContainer() |
| @@ -74,7 +74,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 74 | 74 | return decoder |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | -func newJSONEncoder() -> JSONEncoder { | |
| 77 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 78 | 78 | let encoder = JSONEncoder() |
| 79 | 79 | let formatter = DateFormatter() |
| 80 | 80 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/date-time-or-string.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -87,7 +87,7 @@ enum BarEnum: String, Codable { | ||
| 87 | 87 | |
| 88 | 88 | // MARK: - Helper functions for creating encoders and decoders |
| 89 | 89 | |
| 90 | -func newJSONDecoder() -> JSONDecoder { | |
| 90 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 91 | 91 | let decoder = JSONDecoder() |
| 92 | 92 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 93 | 93 | let container = try decoder.singleValueContainer() |
| @@ -110,7 +110,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 110 | 110 | return decoder |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | -func newJSONEncoder() -> JSONEncoder { | |
| 113 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 114 | 114 | let encoder = JSONEncoder() |
| 115 | 115 | let formatter = DateFormatter() |
| 116 | 116 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/description-with-double-quotes.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -52,7 +52,7 @@ extension TopLevel { | ||
| 52 | 52 | |
| 53 | 53 | // MARK: - Helper functions for creating encoders and decoders |
| 54 | 54 | |
| 55 | -func newJSONDecoder() -> JSONDecoder { | |
| 55 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 56 | 56 | let decoder = JSONDecoder() |
| 57 | 57 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 58 | 58 | let container = try decoder.singleValueContainer() |
| @@ -75,7 +75,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 75 | 75 | return decoder |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | -func newJSONEncoder() -> JSONEncoder { | |
| 78 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 79 | 79 | let encoder = JSONEncoder() |
| 80 | 80 | let formatter = DateFormatter() |
| 81 | 81 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/description.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -180,7 +180,7 @@ enum Union: Codable { | ||
| 180 | 180 | |
| 181 | 181 | // MARK: - Helper functions for creating encoders and decoders |
| 182 | 182 | |
| 183 | -func newJSONDecoder() -> JSONDecoder { | |
| 183 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 184 | 184 | let decoder = JSONDecoder() |
| 185 | 185 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 186 | 186 | let container = try decoder.singleValueContainer() |
| @@ -203,7 +203,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 203 | 203 | return decoder |
| 204 | 204 | } |
| 205 | 205 | |
| 206 | -func newJSONEncoder() -> JSONEncoder { | |
| 206 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 207 | 207 | let encoder = JSONEncoder() |
| 208 | 208 | let formatter = DateFormatter() |
| 209 | 209 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/direct-union.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -162,7 +162,7 @@ enum Anything: Codable { | ||
| 162 | 162 | |
| 163 | 163 | // MARK: - Helper functions for creating encoders and decoders |
| 164 | 164 | |
| 165 | -func newJSONDecoder() -> JSONDecoder { | |
| 165 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 166 | 166 | let decoder = JSONDecoder() |
| 167 | 167 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 168 | 168 | let container = try decoder.singleValueContainer() |
| @@ -185,7 +185,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 185 | 185 | return decoder |
| 186 | 186 | } |
| 187 | 187 | |
| 188 | -func newJSONEncoder() -> JSONEncoder { | |
| 188 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 189 | 189 | let encoder = JSONEncoder() |
| 190 | 190 | let formatter = DateFormatter() |
| 191 | 191 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/empty-object.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -33,7 +33,7 @@ extension Dictionary where Key == String, Value == JSONAny { | ||
| 33 | 33 | |
| 34 | 34 | // MARK: - Helper functions for creating encoders and decoders |
| 35 | 35 | |
| 36 | -func newJSONDecoder() -> JSONDecoder { | |
| 36 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 37 | 37 | let decoder = JSONDecoder() |
| 38 | 38 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 39 | 39 | let container = try decoder.singleValueContainer() |
| @@ -56,7 +56,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 56 | 56 | return decoder |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | -func newJSONEncoder() -> JSONEncoder { | |
| 59 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 60 | 60 | let encoder = JSONEncoder() |
| 61 | 61 | let formatter = DateFormatter() |
| 62 | 62 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/enum-with-null.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -56,7 +56,7 @@ enum Enum: String, Codable { | ||
| 56 | 56 | |
| 57 | 57 | // MARK: - Helper functions for creating encoders and decoders |
| 58 | 58 | |
| 59 | -func newJSONDecoder() -> JSONDecoder { | |
| 59 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 60 | 60 | let decoder = JSONDecoder() |
| 61 | 61 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 62 | 62 | let container = try decoder.singleValueContainer() |
| @@ -79,7 +79,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 79 | 79 | return decoder |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | -func newJSONEncoder() -> JSONEncoder { | |
| 82 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 83 | 83 | let encoder = JSONEncoder() |
| 84 | 84 | let formatter = DateFormatter() |
| 85 | 85 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/enum-with-values.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -61,7 +61,7 @@ enum Weekdays: String, Codable { | ||
| 61 | 61 | |
| 62 | 62 | // MARK: - Helper functions for creating encoders and decoders |
| 63 | 63 | |
| 64 | -func newJSONDecoder() -> JSONDecoder { | |
| 64 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 65 | 65 | let decoder = JSONDecoder() |
| 66 | 66 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 67 | 67 | let container = try decoder.singleValueContainer() |
| @@ -84,7 +84,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 84 | 84 | return decoder |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | -func newJSONEncoder() -> JSONEncoder { | |
| 87 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 88 | 88 | let encoder = JSONEncoder() |
| 89 | 89 | let formatter = DateFormatter() |
| 90 | 90 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/id-no-address.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -51,7 +51,7 @@ extension TopLevel { | ||
| 51 | 51 | |
| 52 | 52 | // MARK: - Helper functions for creating encoders and decoders |
| 53 | 53 | |
| 54 | -func newJSONDecoder() -> JSONDecoder { | |
| 54 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 55 | 55 | let decoder = JSONDecoder() |
| 56 | 56 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 57 | 57 | let container = try decoder.singleValueContainer() |
| @@ -74,7 +74,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 74 | 74 | return decoder |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | -func newJSONEncoder() -> JSONEncoder { | |
| 77 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 78 | 78 | let encoder = JSONEncoder() |
| 79 | 79 | let formatter = DateFormatter() |
| 80 | 80 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/id-root.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -51,7 +51,7 @@ extension TopLevel { | ||
| 51 | 51 | |
| 52 | 52 | // MARK: - Helper functions for creating encoders and decoders |
| 53 | 53 | |
| 54 | -func newJSONDecoder() -> JSONDecoder { | |
| 54 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 55 | 55 | let decoder = JSONDecoder() |
| 56 | 56 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 57 | 57 | let container = try decoder.singleValueContainer() |
| @@ -74,7 +74,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 74 | 74 | return decoder |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | -func newJSONEncoder() -> JSONEncoder { | |
| 77 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 78 | 78 | let encoder = JSONEncoder() |
| 79 | 79 | let formatter = DateFormatter() |
| 80 | 80 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/ie-suffix-singularization.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -99,7 +99,7 @@ extension Cookie { | ||
| 99 | 99 | |
| 100 | 100 | // MARK: - Helper functions for creating encoders and decoders |
| 101 | 101 | |
| 102 | -func newJSONDecoder() -> JSONDecoder { | |
| 102 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 103 | 103 | let decoder = JSONDecoder() |
| 104 | 104 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 105 | 105 | let container = try decoder.singleValueContainer() |
| @@ -122,7 +122,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 122 | 122 | return decoder |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | -func newJSONEncoder() -> JSONEncoder { | |
| 125 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 126 | 126 | let encoder = JSONEncoder() |
| 127 | 127 | let formatter = DateFormatter() |
| 128 | 128 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/implicit-all-of.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -59,7 +59,7 @@ extension TopLevel { | ||
| 59 | 59 | |
| 60 | 60 | // MARK: - Helper functions for creating encoders and decoders |
| 61 | 61 | |
| 62 | -func newJSONDecoder() -> JSONDecoder { | |
| 62 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 63 | 63 | let decoder = JSONDecoder() |
| 64 | 64 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 65 | 65 | let container = try decoder.singleValueContainer() |
| @@ -82,7 +82,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 82 | 82 | return decoder |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | -func newJSONEncoder() -> JSONEncoder { | |
| 85 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 86 | 86 | let encoder = JSONEncoder() |
| 87 | 87 | let formatter = DateFormatter() |
| 88 | 88 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/implicit-one-of.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -59,7 +59,7 @@ extension TopLevel { | ||
| 59 | 59 | |
| 60 | 60 | // MARK: - Helper functions for creating encoders and decoders |
| 61 | 61 | |
| 62 | -func newJSONDecoder() -> JSONDecoder { | |
| 62 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 63 | 63 | let decoder = JSONDecoder() |
| 64 | 64 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 65 | 65 | let container = try decoder.singleValueContainer() |
| @@ -82,7 +82,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 82 | 82 | return decoder |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | -func newJSONEncoder() -> JSONEncoder { | |
| 85 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 86 | 86 | let encoder = JSONEncoder() |
| 87 | 87 | let formatter = DateFormatter() |
| 88 | 88 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/integer-float-union.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -79,7 +79,7 @@ enum Number: Codable { | ||
| 79 | 79 | |
| 80 | 80 | // MARK: - Helper functions for creating encoders and decoders |
| 81 | 81 | |
| 82 | -func newJSONDecoder() -> JSONDecoder { | |
| 82 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 83 | 83 | let decoder = JSONDecoder() |
| 84 | 84 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 85 | 85 | let container = try decoder.singleValueContainer() |
| @@ -102,7 +102,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 102 | 102 | return decoder |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | -func newJSONEncoder() -> JSONEncoder { | |
| 105 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 106 | 106 | let encoder = JSONEncoder() |
| 107 | 107 | let formatter = DateFormatter() |
| 108 | 108 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/integer-string.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -103,7 +103,7 @@ enum UnionWithInt: Codable { | ||
| 103 | 103 | |
| 104 | 104 | // MARK: - Helper functions for creating encoders and decoders |
| 105 | 105 | |
| 106 | -func newJSONDecoder() -> JSONDecoder { | |
| 106 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 107 | 107 | let decoder = JSONDecoder() |
| 108 | 108 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 109 | 109 | let container = try decoder.singleValueContainer() |
| @@ -126,7 +126,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 126 | 126 | return decoder |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | -func newJSONEncoder() -> JSONEncoder { | |
| 129 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 130 | 130 | let encoder = JSONEncoder() |
| 131 | 131 | let formatter = DateFormatter() |
| 132 | 132 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/integer-type.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -83,7 +83,7 @@ extension TopLevel { | ||
| 83 | 83 | |
| 84 | 84 | // MARK: - Helper functions for creating encoders and decoders |
| 85 | 85 | |
| 86 | -func newJSONDecoder() -> JSONDecoder { | |
| 86 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 87 | 87 | let decoder = JSONDecoder() |
| 88 | 88 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 89 | 89 | let container = try decoder.singleValueContainer() |
| @@ -106,7 +106,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 106 | 106 | return decoder |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | -func newJSONEncoder() -> JSONEncoder { | |
| 109 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 110 | 110 | let encoder = JSONEncoder() |
| 111 | 111 | let formatter = DateFormatter() |
| 112 | 112 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/intersection-nested.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -51,7 +51,7 @@ extension TopLevel { | ||
| 51 | 51 | |
| 52 | 52 | // MARK: - Helper functions for creating encoders and decoders |
| 53 | 53 | |
| 54 | -func newJSONDecoder() -> JSONDecoder { | |
| 54 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 55 | 55 | let decoder = JSONDecoder() |
| 56 | 56 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 57 | 57 | let container = try decoder.singleValueContainer() |
| @@ -74,7 +74,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 74 | 74 | return decoder |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | -func newJSONEncoder() -> JSONEncoder { | |
| 77 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 78 | 78 | let encoder = JSONEncoder() |
| 79 | 79 | let formatter = DateFormatter() |
| 80 | 80 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/issue2680-top-level-array.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -33,7 +33,7 @@ extension Array where Element == TopLevel.Element { | ||
| 33 | 33 | |
| 34 | 34 | // MARK: - Helper functions for creating encoders and decoders |
| 35 | 35 | |
| 36 | -func newJSONDecoder() -> JSONDecoder { | |
| 36 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 37 | 37 | let decoder = JSONDecoder() |
| 38 | 38 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 39 | 39 | let container = try decoder.singleValueContainer() |
| @@ -56,7 +56,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 56 | 56 | return decoder |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | -func newJSONEncoder() -> JSONEncoder { | |
| 59 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 60 | 60 | let encoder = JSONEncoder() |
| 61 | 61 | let formatter = DateFormatter() |
| 62 | 62 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/keyword-enum.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -331,7 +331,7 @@ enum Enum: String, Codable { | ||
| 331 | 331 | |
| 332 | 332 | // MARK: - Helper functions for creating encoders and decoders |
| 333 | 333 | |
| 334 | -func newJSONDecoder() -> JSONDecoder { | |
| 334 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 335 | 335 | let decoder = JSONDecoder() |
| 336 | 336 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 337 | 337 | let container = try decoder.singleValueContainer() |
| @@ -354,7 +354,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 354 | 354 | return decoder |
| 355 | 355 | } |
| 356 | 356 | |
| 357 | -func newJSONEncoder() -> JSONEncoder { | |
| 357 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 358 | 358 | let encoder = JSONEncoder() |
| 359 | 359 | let formatter = DateFormatter() |
| 360 | 360 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/keyword-unions.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -19095,7 +19095,7 @@ extension Yield { | ||
| 19095 | 19095 | |
| 19096 | 19096 | // MARK: - Helper functions for creating encoders and decoders |
| 19097 | 19097 | |
| 19098 | -func newJSONDecoder() -> JSONDecoder { | |
| 19098 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 19099 | 19099 | let decoder = JSONDecoder() |
| 19100 | 19100 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 19101 | 19101 | let container = try decoder.singleValueContainer() |
| @@ -19118,7 +19118,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 19118 | 19118 | return decoder |
| 19119 | 19119 | } |
| 19120 | 19120 | |
| 19121 | -func newJSONEncoder() -> JSONEncoder { | |
| 19121 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 19122 | 19122 | let encoder = JSONEncoder() |
| 19123 | 19123 | let formatter = DateFormatter() |
| 19124 | 19124 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/light.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -103,7 +103,7 @@ extension LightParams { | ||
| 103 | 103 | |
| 104 | 104 | // MARK: - Helper functions for creating encoders and decoders |
| 105 | 105 | |
| 106 | -func newJSONDecoder() -> JSONDecoder { | |
| 106 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 107 | 107 | let decoder = JSONDecoder() |
| 108 | 108 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 109 | 109 | let container = try decoder.singleValueContainer() |
| @@ -126,7 +126,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 126 | 126 | return decoder |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | -func newJSONEncoder() -> JSONEncoder { | |
| 129 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 130 | 130 | let encoder = JSONEncoder() |
| 131 | 131 | let formatter = DateFormatter() |
| 132 | 132 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/list.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -57,7 +57,7 @@ extension TopLevel { | ||
| 57 | 57 | |
| 58 | 58 | // MARK: - Helper functions for creating encoders and decoders |
| 59 | 59 | |
| 60 | -func newJSONDecoder() -> JSONDecoder { | |
| 60 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 61 | 61 | let decoder = JSONDecoder() |
| 62 | 62 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 63 | 63 | let container = try decoder.singleValueContainer() |
| @@ -80,7 +80,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 80 | 80 | return decoder |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | -func newJSONEncoder() -> JSONEncoder { | |
| 83 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 84 | 84 | let encoder = JSONEncoder() |
| 85 | 85 | let formatter = DateFormatter() |
| 86 | 86 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/min-max-items.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -95,7 +95,7 @@ enum UnionItem: Codable { | ||
| 95 | 95 | |
| 96 | 96 | // MARK: - Helper functions for creating encoders and decoders |
| 97 | 97 | |
| 98 | -func newJSONDecoder() -> JSONDecoder { | |
| 98 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 99 | 99 | let decoder = JSONDecoder() |
| 100 | 100 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 101 | 101 | let container = try decoder.singleValueContainer() |
| @@ -118,7 +118,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 118 | 118 | return decoder |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | -func newJSONEncoder() -> JSONEncoder { | |
| 121 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 122 | 122 | let encoder = JSONEncoder() |
| 123 | 123 | let formatter = DateFormatter() |
| 124 | 124 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/minmax-integer.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -79,7 +79,7 @@ extension TopLevel { | ||
| 79 | 79 | |
| 80 | 80 | // MARK: - Helper functions for creating encoders and decoders |
| 81 | 81 | |
| 82 | -func newJSONDecoder() -> JSONDecoder { | |
| 82 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 83 | 83 | let decoder = JSONDecoder() |
| 84 | 84 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 85 | 85 | let container = try decoder.singleValueContainer() |
| @@ -102,7 +102,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 102 | 102 | return decoder |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | -func newJSONEncoder() -> JSONEncoder { | |
| 105 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 106 | 106 | let encoder = JSONEncoder() |
| 107 | 107 | let formatter = DateFormatter() |
| 108 | 108 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/minmax.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -79,7 +79,7 @@ extension TopLevel { | ||
| 79 | 79 | |
| 80 | 80 | // MARK: - Helper functions for creating encoders and decoders |
| 81 | 81 | |
| 82 | -func newJSONDecoder() -> JSONDecoder { | |
| 82 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 83 | 83 | let decoder = JSONDecoder() |
| 84 | 84 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 85 | 85 | let container = try decoder.singleValueContainer() |
| @@ -102,7 +102,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 102 | 102 | return decoder |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | -func newJSONEncoder() -> JSONEncoder { | |
| 105 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 106 | 106 | let encoder = JSONEncoder() |
| 107 | 107 | let formatter = DateFormatter() |
| 108 | 108 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/minmaxlength.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -107,7 +107,7 @@ enum InUnion: Codable { | ||
| 107 | 107 | |
| 108 | 108 | // MARK: - Helper functions for creating encoders and decoders |
| 109 | 109 | |
| 110 | -func newJSONDecoder() -> JSONDecoder { | |
| 110 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 111 | 111 | let decoder = JSONDecoder() |
| 112 | 112 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 113 | 113 | let container = try decoder.singleValueContainer() |
| @@ -130,7 +130,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 130 | 130 | return decoder |
| 131 | 131 | } |
| 132 | 132 | |
| 133 | -func newJSONEncoder() -> JSONEncoder { | |
| 133 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 134 | 134 | let encoder = JSONEncoder() |
| 135 | 135 | let formatter = DateFormatter() |
| 136 | 136 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/mutually-recursive.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -128,7 +128,7 @@ extension TopLevel { | ||
| 128 | 128 | |
| 129 | 129 | // MARK: - Helper functions for creating encoders and decoders |
| 130 | 130 | |
| 131 | -func newJSONDecoder() -> JSONDecoder { | |
| 131 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 132 | 132 | let decoder = JSONDecoder() |
| 133 | 133 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 134 | 134 | let container = try decoder.singleValueContainer() |
| @@ -151,7 +151,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 151 | 151 | return decoder |
| 152 | 152 | } |
| 153 | 153 | |
| 154 | -func newJSONEncoder() -> JSONEncoder { | |
| 154 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 155 | 155 | let encoder = JSONEncoder() |
| 156 | 156 | let formatter = DateFormatter() |
| 157 | 157 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/nested-intersection-union.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -107,7 +107,7 @@ extension Item { | ||
| 107 | 107 | |
| 108 | 108 | // MARK: - Helper functions for creating encoders and decoders |
| 109 | 109 | |
| 110 | -func newJSONDecoder() -> JSONDecoder { | |
| 110 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 111 | 111 | let decoder = JSONDecoder() |
| 112 | 112 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 113 | 113 | let container = try decoder.singleValueContainer() |
| @@ -130,7 +130,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 130 | 130 | return decoder |
| 131 | 131 | } |
| 132 | 132 | |
| 133 | -func newJSONEncoder() -> JSONEncoder { | |
| 133 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 134 | 134 | let encoder = JSONEncoder() |
| 135 | 135 | let formatter = DateFormatter() |
| 136 | 136 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/non-standard-ref.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -59,7 +59,7 @@ extension TopLevel { | ||
| 59 | 59 | |
| 60 | 60 | // MARK: - Helper functions for creating encoders and decoders |
| 61 | 61 | |
| 62 | -func newJSONDecoder() -> JSONDecoder { | |
| 62 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 63 | 63 | let decoder = JSONDecoder() |
| 64 | 64 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 65 | 65 | let container = try decoder.singleValueContainer() |
| @@ -82,7 +82,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 82 | 82 | return decoder |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | -func newJSONEncoder() -> JSONEncoder { | |
| 85 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 86 | 86 | let encoder = JSONEncoder() |
| 87 | 87 | let formatter = DateFormatter() |
| 88 | 88 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/object-type-required.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -55,7 +55,7 @@ extension TopLevel { | ||
| 55 | 55 | |
| 56 | 56 | // MARK: - Helper functions for creating encoders and decoders |
| 57 | 57 | |
| 58 | -func newJSONDecoder() -> JSONDecoder { | |
| 58 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 59 | 59 | let decoder = JSONDecoder() |
| 60 | 60 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 61 | 61 | let container = try decoder.singleValueContainer() |
| @@ -78,7 +78,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 78 | 78 | return decoder |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | -func newJSONEncoder() -> JSONEncoder { | |
| 81 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 82 | 82 | let encoder = JSONEncoder() |
| 83 | 83 | let formatter = DateFormatter() |
| 84 | 84 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/optional-any.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -55,7 +55,7 @@ extension TopLevel { | ||
| 55 | 55 | |
| 56 | 56 | // MARK: - Helper functions for creating encoders and decoders |
| 57 | 57 | |
| 58 | -func newJSONDecoder() -> JSONDecoder { | |
| 58 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 59 | 59 | let decoder = JSONDecoder() |
| 60 | 60 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 61 | 61 | let container = try decoder.singleValueContainer() |
| @@ -78,7 +78,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 78 | 78 | return decoder |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | -func newJSONEncoder() -> JSONEncoder { | |
| 81 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 82 | 82 | let encoder = JSONEncoder() |
| 83 | 83 | let formatter = DateFormatter() |
| 84 | 84 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/optional-const-ref.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -123,7 +123,7 @@ extension Coordinate { | ||
| 123 | 123 | |
| 124 | 124 | // MARK: - Helper functions for creating encoders and decoders |
| 125 | 125 | |
| 126 | -func newJSONDecoder() -> JSONDecoder { | |
| 126 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 127 | 127 | let decoder = JSONDecoder() |
| 128 | 128 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 129 | 129 | let container = try decoder.singleValueContainer() |
| @@ -146,7 +146,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 146 | 146 | return decoder |
| 147 | 147 | } |
| 148 | 148 | |
| 149 | -func newJSONEncoder() -> JSONEncoder { | |
| 149 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 150 | 150 | let encoder = JSONEncoder() |
| 151 | 151 | let formatter = DateFormatter() |
| 152 | 152 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/optional-constraints.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -67,7 +67,7 @@ extension TopLevel { | ||
| 67 | 67 | |
| 68 | 68 | // MARK: - Helper functions for creating encoders and decoders |
| 69 | 69 | |
| 70 | -func newJSONDecoder() -> JSONDecoder { | |
| 70 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 71 | 71 | let decoder = JSONDecoder() |
| 72 | 72 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 73 | 73 | let container = try decoder.singleValueContainer() |
| @@ -90,7 +90,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 90 | 90 | return decoder |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | -func newJSONEncoder() -> JSONEncoder { | |
| 93 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 94 | 94 | let encoder = JSONEncoder() |
| 95 | 95 | let formatter = DateFormatter() |
| 96 | 96 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/optional-date-time.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -71,7 +71,7 @@ extension TopLevel { | ||
| 71 | 71 | |
| 72 | 72 | // MARK: - Helper functions for creating encoders and decoders |
| 73 | 73 | |
| 74 | -func newJSONDecoder() -> JSONDecoder { | |
| 74 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 75 | 75 | let decoder = JSONDecoder() |
| 76 | 76 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 77 | 77 | let container = try decoder.singleValueContainer() |
| @@ -94,7 +94,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 94 | 94 | return decoder |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | -func newJSONEncoder() -> JSONEncoder { | |
| 97 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 98 | 98 | let encoder = JSONEncoder() |
| 99 | 99 | let formatter = DateFormatter() |
| 100 | 100 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/pattern.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -59,7 +59,7 @@ extension TopLevel { | ||
| 59 | 59 | |
| 60 | 60 | // MARK: - Helper functions for creating encoders and decoders |
| 61 | 61 | |
| 62 | -func newJSONDecoder() -> JSONDecoder { | |
| 62 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 63 | 63 | let decoder = JSONDecoder() |
| 64 | 64 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 65 | 65 | let container = try decoder.singleValueContainer() |
| @@ -82,7 +82,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 82 | 82 | return decoder |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | -func newJSONEncoder() -> JSONEncoder { | |
| 85 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 86 | 86 | let encoder = JSONEncoder() |
| 87 | 87 | let formatter = DateFormatter() |
| 88 | 88 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/postman-collection.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -104,7 +104,7 @@ extension Response { | ||
| 104 | 104 | |
| 105 | 105 | // MARK: - Helper functions for creating encoders and decoders |
| 106 | 106 | |
| 107 | -func newJSONDecoder() -> JSONDecoder { | |
| 107 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 108 | 108 | let decoder = JSONDecoder() |
| 109 | 109 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 110 | 110 | let container = try decoder.singleValueContainer() |
| @@ -127,7 +127,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 127 | 127 | return decoder |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | -func newJSONEncoder() -> JSONEncoder { | |
| 130 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 131 | 131 | let encoder = JSONEncoder() |
| 132 | 132 | let formatter = DateFormatter() |
| 133 | 133 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/prefix-items.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -83,7 +83,7 @@ enum Open: Codable { | ||
| 83 | 83 | |
| 84 | 84 | // MARK: - Helper functions for creating encoders and decoders |
| 85 | 85 | |
| 86 | -func newJSONDecoder() -> JSONDecoder { | |
| 86 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 87 | 87 | let decoder = JSONDecoder() |
| 88 | 88 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 89 | 89 | let container = try decoder.singleValueContainer() |
| @@ -106,7 +106,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 106 | 106 | return decoder |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | -func newJSONEncoder() -> JSONEncoder { | |
| 109 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 110 | 110 | let encoder = JSONEncoder() |
| 111 | 111 | let formatter = DateFormatter() |
| 112 | 112 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/recursive-union-flattening.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -347,7 +347,7 @@ enum X: Codable { | ||
| 347 | 347 | |
| 348 | 348 | // MARK: - Helper functions for creating encoders and decoders |
| 349 | 349 | |
| 350 | -func newJSONDecoder() -> JSONDecoder { | |
| 350 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 351 | 351 | let decoder = JSONDecoder() |
| 352 | 352 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 353 | 353 | let container = try decoder.singleValueContainer() |
| @@ -370,7 +370,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 370 | 370 | return decoder |
| 371 | 371 | } |
| 372 | 372 | |
| 373 | -func newJSONEncoder() -> JSONEncoder { | |
| 373 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 374 | 374 | let encoder = JSONEncoder() |
| 375 | 375 | let formatter = DateFormatter() |
| 376 | 376 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/ref-id-files.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -51,7 +51,7 @@ extension TopLevel { | ||
| 51 | 51 | |
| 52 | 52 | // MARK: - Helper functions for creating encoders and decoders |
| 53 | 53 | |
| 54 | -func newJSONDecoder() -> JSONDecoder { | |
| 54 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 55 | 55 | let decoder = JSONDecoder() |
| 56 | 56 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 57 | 57 | let container = try decoder.singleValueContainer() |
| @@ -74,7 +74,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 74 | 74 | return decoder |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | -func newJSONEncoder() -> JSONEncoder { | |
| 77 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 78 | 78 | let encoder = JSONEncoder() |
| 79 | 79 | let formatter = DateFormatter() |
| 80 | 80 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/ref-remote.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -57,7 +57,7 @@ extension TopLevel { | ||
| 57 | 57 | |
| 58 | 58 | // MARK: - Helper functions for creating encoders and decoders |
| 59 | 59 | |
| 60 | -func newJSONDecoder() -> JSONDecoder { | |
| 60 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 61 | 61 | let decoder = JSONDecoder() |
| 62 | 62 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 63 | 63 | let container = try decoder.singleValueContainer() |
| @@ -80,7 +80,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 80 | 80 | return decoder |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | -func newJSONEncoder() -> JSONEncoder { | |
| 83 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 84 | 84 | let encoder = JSONEncoder() |
| 85 | 85 | let formatter = DateFormatter() |
| 86 | 86 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/renaming-bug.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -716,7 +716,7 @@ enum Name: String, Codable { | ||
| 716 | 716 | |
| 717 | 717 | // MARK: - Helper functions for creating encoders and decoders |
| 718 | 718 | |
| 719 | -func newJSONDecoder() -> JSONDecoder { | |
| 719 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 720 | 720 | let decoder = JSONDecoder() |
| 721 | 721 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 722 | 722 | let container = try decoder.singleValueContainer() |
| @@ -739,7 +739,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 739 | 739 | return decoder |
| 740 | 740 | } |
| 741 | 741 | |
| 742 | -func newJSONEncoder() -> JSONEncoder { | |
| 742 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 743 | 743 | let encoder = JSONEncoder() |
| 744 | 744 | let formatter = DateFormatter() |
| 745 | 745 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/required-draft3.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -51,7 +51,7 @@ extension TopLevel { | ||
| 51 | 51 | |
| 52 | 52 | // MARK: - Helper functions for creating encoders and decoders |
| 53 | 53 | |
| 54 | -func newJSONDecoder() -> JSONDecoder { | |
| 54 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 55 | 55 | let decoder = JSONDecoder() |
| 56 | 56 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 57 | 57 | let container = try decoder.singleValueContainer() |
| @@ -74,7 +74,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 74 | 74 | return decoder |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | -func newJSONEncoder() -> JSONEncoder { | |
| 77 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 78 | 78 | let encoder = JSONEncoder() |
| 79 | 79 | let formatter = DateFormatter() |
| 80 | 80 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/required-non-properties.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -55,7 +55,7 @@ extension TopLevel { | ||
| 55 | 55 | |
| 56 | 56 | // MARK: - Helper functions for creating encoders and decoders |
| 57 | 57 | |
| 58 | -func newJSONDecoder() -> JSONDecoder { | |
| 58 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 59 | 59 | let decoder = JSONDecoder() |
| 60 | 60 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 61 | 61 | let container = try decoder.singleValueContainer() |
| @@ -78,7 +78,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 78 | 78 | return decoder |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | -func newJSONEncoder() -> JSONEncoder { | |
| 81 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 82 | 82 | let encoder = JSONEncoder() |
| 83 | 83 | let formatter = DateFormatter() |
| 84 | 84 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/rust-cycle-breaker-union.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -138,7 +138,7 @@ indirect enum Next: Codable { | ||
| 138 | 138 | |
| 139 | 139 | // MARK: - Helper functions for creating encoders and decoders |
| 140 | 140 | |
| 141 | -func newJSONDecoder() -> JSONDecoder { | |
| 141 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 142 | 142 | let decoder = JSONDecoder() |
| 143 | 143 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 144 | 144 | let container = try decoder.singleValueContainer() |
| @@ -161,7 +161,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 161 | 161 | return decoder |
| 162 | 162 | } |
| 163 | 163 | |
| 164 | -func newJSONEncoder() -> JSONEncoder { | |
| 164 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 165 | 165 | let encoder = JSONEncoder() |
| 166 | 166 | let formatter = DateFormatter() |
| 167 | 167 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/schema-constraints.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -55,7 +55,7 @@ extension TopLevel { | ||
| 55 | 55 | |
| 56 | 56 | // MARK: - Helper functions for creating encoders and decoders |
| 57 | 57 | |
| 58 | -func newJSONDecoder() -> JSONDecoder { | |
| 58 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 59 | 59 | let decoder = JSONDecoder() |
| 60 | 60 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 61 | 61 | let container = try decoder.singleValueContainer() |
| @@ -78,7 +78,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 78 | 78 | return decoder |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | -func newJSONEncoder() -> JSONEncoder { | |
| 81 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 82 | 82 | let encoder = JSONEncoder() |
| 83 | 83 | let formatter = DateFormatter() |
| 84 | 84 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/simple-ref.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -57,7 +57,7 @@ extension TopLevel { | ||
| 57 | 57 | |
| 58 | 58 | // MARK: - Helper functions for creating encoders and decoders |
| 59 | 59 | |
| 60 | -func newJSONDecoder() -> JSONDecoder { | |
| 60 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 61 | 61 | let decoder = JSONDecoder() |
| 62 | 62 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 63 | 63 | let container = try decoder.singleValueContainer() |
| @@ -80,7 +80,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 80 | 80 | return decoder |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | -func newJSONEncoder() -> JSONEncoder { | |
| 83 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 84 | 84 | let encoder = JSONEncoder() |
| 85 | 85 | let formatter = DateFormatter() |
| 86 | 86 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/strict-optional.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -51,7 +51,7 @@ extension TopLevel { | ||
| 51 | 51 | |
| 52 | 52 | // MARK: - Helper functions for creating encoders and decoders |
| 53 | 53 | |
| 54 | -func newJSONDecoder() -> JSONDecoder { | |
| 54 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 55 | 55 | let decoder = JSONDecoder() |
| 56 | 56 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 57 | 57 | let container = try decoder.singleValueContainer() |
| @@ -74,7 +74,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 74 | 74 | return decoder |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | -func newJSONEncoder() -> JSONEncoder { | |
| 77 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 78 | 78 | let encoder = JSONEncoder() |
| 79 | 79 | let formatter = DateFormatter() |
| 80 | 80 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/top-level-array.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -82,7 +82,7 @@ extension Array where Element == TopLevel.Element { | ||
| 82 | 82 | |
| 83 | 83 | // MARK: - Helper functions for creating encoders and decoders |
| 84 | 84 | |
| 85 | -func newJSONDecoder() -> JSONDecoder { | |
| 85 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 86 | 86 | let decoder = JSONDecoder() |
| 87 | 87 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 88 | 88 | let container = try decoder.singleValueContainer() |
| @@ -105,7 +105,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 105 | 105 | return decoder |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | -func newJSONEncoder() -> JSONEncoder { | |
| 108 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 109 | 109 | let encoder = JSONEncoder() |
| 110 | 110 | let formatter = DateFormatter() |
| 111 | 111 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/top-level-primitive-array.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -33,7 +33,7 @@ extension Array where Element == TopLevel.Element { | ||
| 33 | 33 | |
| 34 | 34 | // MARK: - Helper functions for creating encoders and decoders |
| 35 | 35 | |
| 36 | -func newJSONDecoder() -> JSONDecoder { | |
| 36 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 37 | 37 | let decoder = JSONDecoder() |
| 38 | 38 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 39 | 39 | let container = try decoder.singleValueContainer() |
| @@ -56,7 +56,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 56 | 56 | return decoder |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | -func newJSONEncoder() -> JSONEncoder { | |
| 59 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 60 | 60 | let encoder = JSONEncoder() |
| 61 | 61 | let formatter = DateFormatter() |
| 62 | 62 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/tuple.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -79,7 +79,7 @@ enum Tuple: Codable { | ||
| 79 | 79 | |
| 80 | 80 | // MARK: - Helper functions for creating encoders and decoders |
| 81 | 81 | |
| 82 | -func newJSONDecoder() -> JSONDecoder { | |
| 82 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 83 | 83 | let decoder = JSONDecoder() |
| 84 | 84 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 85 | 85 | let container = try decoder.singleValueContainer() |
| @@ -102,7 +102,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 102 | 102 | return decoder |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | -func newJSONEncoder() -> JSONEncoder { | |
| 105 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 106 | 106 | let encoder = JSONEncoder() |
| 107 | 107 | let formatter = DateFormatter() |
| 108 | 108 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/union-int-double.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -86,7 +86,7 @@ enum Value: Codable { | ||
| 86 | 86 | |
| 87 | 87 | // MARK: - Helper functions for creating encoders and decoders |
| 88 | 88 | |
| 89 | -func newJSONDecoder() -> JSONDecoder { | |
| 89 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 90 | 90 | let decoder = JSONDecoder() |
| 91 | 91 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 92 | 92 | let container = try decoder.singleValueContainer() |
| @@ -109,7 +109,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 109 | 109 | return decoder |
| 110 | 110 | } |
| 111 | 111 | |
| 112 | -func newJSONEncoder() -> JSONEncoder { | |
| 112 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 113 | 113 | let encoder = JSONEncoder() |
| 114 | 114 | let formatter = DateFormatter() |
| 115 | 115 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/union-list.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -123,7 +123,7 @@ indirect enum UnionList: Codable { | ||
| 123 | 123 | |
| 124 | 124 | // MARK: - Helper functions for creating encoders and decoders |
| 125 | 125 | |
| 126 | -func newJSONDecoder() -> JSONDecoder { | |
| 126 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 127 | 127 | let decoder = JSONDecoder() |
| 128 | 128 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 129 | 129 | let container = try decoder.singleValueContainer() |
| @@ -146,7 +146,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 146 | 146 | return decoder |
| 147 | 147 | } |
| 148 | 148 | |
| 149 | -func newJSONEncoder() -> JSONEncoder { | |
| 149 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 150 | 150 | let encoder = JSONEncoder() |
| 151 | 151 | let formatter = DateFormatter() |
| 152 | 152 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/union.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -86,7 +86,7 @@ extension Array where Element == TopLevel.Element { | ||
| 86 | 86 | |
| 87 | 87 | // MARK: - Helper functions for creating encoders and decoders |
| 88 | 88 | |
| 89 | -func newJSONDecoder() -> JSONDecoder { | |
| 89 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 90 | 90 | let decoder = JSONDecoder() |
| 91 | 91 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 92 | 92 | let container = try decoder.singleValueContainer() |
| @@ -109,7 +109,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 109 | 109 | return decoder |
| 110 | 110 | } |
| 111 | 111 | |
| 112 | -func newJSONEncoder() -> JSONEncoder { | |
| 112 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 113 | 113 | let encoder = JSONEncoder() |
| 114 | 114 | let formatter = DateFormatter() |
| 115 | 115 | formatter.calendar = Calendar(identifier: .iso8601) |
Test case
1 generated file · +2 −2test/inputs/schema/uuid.schema
Mschema-swiftdefault / quicktype.swift+2 −2
| @@ -71,7 +71,7 @@ extension TopLevel { | ||
| 71 | 71 | |
| 72 | 72 | // MARK: - Helper functions for creating encoders and decoders |
| 73 | 73 | |
| 74 | -func newJSONDecoder() -> JSONDecoder { | |
| 74 | +fileprivate func newJSONDecoder() -> JSONDecoder { | |
| 75 | 75 | let decoder = JSONDecoder() |
| 76 | 76 | decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in |
| 77 | 77 | let container = try decoder.singleValueContainer() |
| @@ -94,7 +94,7 @@ func newJSONDecoder() -> JSONDecoder { | ||
| 94 | 94 | return decoder |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | -func newJSONEncoder() -> JSONEncoder { | |
| 97 | +fileprivate func newJSONEncoder() -> JSONEncoder { | |
| 98 | 98 | let encoder = JSONEncoder() |
| 99 | 99 | let formatter = DateFormatter() |
| 100 | 100 | formatter.calendar = Calendar(identifier: .iso8601) |
No generated files match these filters.