[예제] JSON

J.Noma·2021년 12월 8일
0
//인코딩
let coffee = Coffee()
let jsonData = try? JSONEncoder().encode(coffee)
//디코딩
let coffee = try? jsonDecoder.decode(Coffee.self, from: jsonData.data)
profile
노션으로 이사갑니다 https://tungsten-run-778.notion.site/Study-Archive-98e51c3793684d428070695d5722d1fe

0개의 댓글