Skip to content

Instantly share code, notes, and snippets.

View vkostechko's full-sized avatar

Viacheslav vkostechko

  • Warsaw, Poland
View GitHub Profile
let filePath = Bundle.main.pathForResource("YOUR_FILE_NAME", ofType: "json", inDirectory: nil)
if let filePath = filePath {
do {
let fileUrl = URL(fileURLWithPath: filePath)
let jsonData = try Data(contentsOf: fileUrl, options: .mappedIfSafe)
let json = try? JSONSerialization.jsonObject(with: jsonData)
} catch {
print(error)
fatalError("Unable to read contents of the file url")
@vkostechko
vkostechko / Emoji.json
Created December 1, 2017 13:13 — forked from 0xced/Emoji.json
Extract emoji by category using the EmojiFoundation framework
{
"People" : [
"😀",
"😃",
"😄",
"😁",
"😆",
"😅",
"😂",
"🤣",