Untitled
unknown
plain_text
25 days ago
712 B
1
Indexable
create a java code that fits these requirements: 1. Base class that a specific method called void fromJSON(String json) 2. This method parses json string and uses tries to find setters in Base class that matches fields from json for example if parameters is "{\"Name\": \"John\", \"Age\": 33}", fromJSON() should find a setter with setName() and setAge() and invokes them with values from JSON as parameters 3. Thus Base only needs to setup everything in a json string and pass it over to its fromJSON() method and Base class gets filled with jizz .. I mean with values 4. fromJSON should also be able to parse array of standard types (e.g. String, int, .. etc) as well as arrays of other classes
Editor is loading...
Leave a Comment