private static IRating createRatingFromActivity ( JSONObject verb ) throws JSONException { Rating rating = new Rating ( ) ; JSONObject measure = verb . getJSONObject ( "measure" ) ; if ( measure == null ) return null ; rating . setMin ( measure . getInt ( "scaleMin" ) ) ; rating . setMax ( measure . getInt ( "scaleMax" ) ) ; rating . setRating ( measure . getInt ( "value" ) ) ; return rating ; }
Create a rating object