September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
28
Task/JSON/Gosu/json-6.gosu
Normal file
28
Task/JSON/Gosu/json-6.gosu
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
structure Person {
|
||||
static function fromJson( jsonText: String ): Person {
|
||||
return gw.lang.reflect.json.Json.fromJson( jsonText ) as Person
|
||||
}
|
||||
static function fromJsonUrl( url: String ): Person {
|
||||
return new java.net.URL( url ).JsonContent
|
||||
}
|
||||
static function fromJsonUrl( url: java.net.URL ): Person {
|
||||
return url.JsonContent
|
||||
}
|
||||
static function fromJsonFile( file: java.io.File ) : Person {
|
||||
return fromJsonUrl( file.toURI().toURL() )
|
||||
}
|
||||
property get Address(): Address
|
||||
property get Hobby(): List<Hobby>
|
||||
property get Age(): Integer
|
||||
property get Name(): String
|
||||
structure Address {
|
||||
property get Number(): Integer
|
||||
property get State(): String
|
||||
property get Street(): String
|
||||
property get City(): String
|
||||
}
|
||||
structure Hobby {
|
||||
property get Category(): String
|
||||
property get Name(): String
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue