Base model class.

Static methods

staticparse<T>(modelClass:Class<T>, body:String):T

Parses the given string-encoded Json as a Model of the specified class.

Returns:

The parsel model.

Throws:

String

If obj is not a dynamic object or if the class for a field was not found.

staticparseArray<T>(modelClass:Class<T>, body:String):Collection<T>

Parses the given Haxe dynamic object as a Collection of Models of the specified class.

Constructor

new()

Methods

toObject():Dynamic

Returns:

A Haxe dynamic object with a shallow copy of this model's properties.

toString():String

Returns:

A String with the JSON representation of this Model.