Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate model objects from Json Schema / Json in xcode (swift)?

I have generated Json(s) for each java class using Gson library. Some of them are in hierarchy nature while others are completely independent. I am looking for a way to convert these Json to plain object (getter and setter methods) in swift. Is there any way to do it? For Java we can convert them using JsonSchema2Pojo

like image 280
Amit Pal Avatar asked Jun 23 '16 22:06

Amit Pal


1 Answers

try JSON4SWIFT.

I feel,thats the equivalent for jsonschema2pojo in java

Updated :

Try QuickType,It even has a plugin for Xcode

like image 120
al_mukthar Avatar answered Oct 14 '22 08:10

al_mukthar