void fromJson( _T &v, JsonReader &json ) const { if( json.type() == JsonReader::START_OBJECT ) { match( json, JsonReader::START_OBJECT ); if( json.type() == JsonReader::END_OBJECT ) throw json_parse_failure(); while( !match0( json, JsonReader::END_OBJECT ) ) { if( matchField0( "circle", json ) ) v.set_circle(circle_s()->fromJson( json )); else if( matchField0( "rectangle", json ) ) v.set_rectangle(rectangle_s()->fromJson( json )); else if( matchField0( "composed", json ) ) v.set_composed(composed_s()->fromJson( json )); else if( matchField0( "translated", json ) ) v.set_translated(translated_s()->fromJson( json )); else throw json_parse_failure(); } return; } throw json_parse_failure(); }