Created
March 19, 2019 15:59
-
-
Save christianklotz/70cc068a7c304321e7373501c57f24e4 to your computer and use it in GitHub Desktop.
Load JSON file into Sketch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let readBinaryFile = (filepath) => { | |
return NSData.alloc().initWithContentsOfFile(filepath); | |
}; | |
let path = "path/to/file.json" | |
let data = readBinaryFile(path) | |
let contents = NSString.alloc().initWithData_encoding(data, NSUTF8StringEncoding) | |
console.log(JSON.parse(contents)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment