title: Displaying 'Instance of class_name' instead of data
body: <p>I am trying to get the data from an API, but when executing the following the code I am getting the response as only 'Instance of class Survey' but not the actual data in the API. Here is the code I am using:</p>
  <pre><code>Future GetSurvey() async {
      var response = await http.get(
        url,
        headers: {
          &quot;Accept&quot;: &quot;application/json&quot;
        }
      );
  if (response.statusCode == 200) {
        // If the server did return a 200 OK response,
        // then parse the JSON.
        var data = convertoJson['Item'];
        print(Questions.fromjson(data));*/
  
        Map&lt;String, dynamic&gt; map = json.decode(response.body);
        var data = map['Item'];
        Survey survey = new Survey.fromjson(data);
        print(survey.questions);
  
  
      } else {
        // If the server did not return a 200 OK response,
        // then throw an exception.
        throw Exception('Failed to load album');
      }
  
  
  
    }
  
  }
  
  class Questions{
    String questions;
  
    Questions({this.questions});
  
    factory Questions.fromjson(Map&lt;String, dynamic&gt; json){
  
  
      //var questionfromjson = json['question'];
      //List&lt;String&gt; questionslist = new List&lt;String&gt;.from(questionfromjson);
  
      return Questions(
        questions: json['question']
      );
    }
  
  }
  
  class Survey{
    String surveyid;
    List&lt;Questions&gt; questions;
  
    Survey({this.surveyid,this.questions});
  
    factory Survey.fromjson(Map&lt;String, dynamic&gt; json){
  
      var list = json['QUESTIONS'] as List;
      print(list.runtimeType);
  
      List&lt;Questions&gt; questionslist = list.map((e) =&gt; Questions.fromjson(e)).toList();
  
      return Survey(
        surveyid: json['OS_ID'],
        questions: questionslist
      );
    }
  
  }
  </code></pre>
  <p>Following is the format of the API:</p>
  <pre><code>{
      &quot;Item&quot;:
      {
          &quot;OS_ID&quot;: &quot;759&quot;,
          &quot;QUESTIONS&quot;:[
          {
              &quot;rule&quot;:,
              &quot;question&quot;: &quot;How much is the value&quot;
          },
          {
              &quot;rule&quot;:,
              &quot;question&quot;: &quot;Describe the view&quot;
          }
      }
  }
  </code></pre>