coable generator python3
{"name":"bens","color":"#fff","price":1300000,"size":{"width":2.8,"height":1.7,"length":4.9}}struct Size: Codable{
var width : Float = 0.0
var height : Float = 0.0
var length : Float = 0.0
}
struct Outer: Codable{
var name : String = ""
var color : String = ""
var price : Int = 0
var size : Size
}- download py to your mac
- open term
- input python3 codable-genertor.py -f src2.json -o Outer -t struct
-f pathname
-o className
-t struct/class
-c copy to clipboard
-np not print the text in console
BSD v3