Skip to content

Instantly share code, notes, and snippets.

View raditsan's full-sized avatar
🎯
Focusing

raditsan

🎯
Focusing
View GitHub Profile
@raditsan
raditsan / main.dart
Created October 21, 2023 18:33
grandiose-lantern-7887
void main() {
for (int i = 0; i < 5; i++) {
print('hello ${i + 1}');
}
}
@raditsan
raditsan / EncoderAndDecoder.swift
Created February 14, 2020 04:37
Decode from struct or class model to JSON String or Data
import UIKit
func newJSONDecoder() -> JSONDecoder {
let decoder = JSONDecoder()
if #available(iOS 10.0, OSX 10.12, tvOS 10.0, watchOS 3.0, *) {
decoder.dateDecodingStrategy = .iso8601
}
return decoder
}
func newJSONEncoder() -> JSONEncoder {