title: Getting typed variable declaration error in a JMeter bean shell script
body: <p>I have this short script in a Bean Shell Post Processor. It uses the GSON library to parse JSON into a Bean. I'm now trying to convert back to JSON using the toJson method but receive this error:</p>
  
  <pre><code>Typed variable declaration : Method Invocation gson.toJson
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>import com.google.gson.Gson;
  
  public class SavedSearch {
      public String id;
  }
  
  Gson gson = new Gson();
  SavedSearch savedSearch = new SavedSearch();
  
  String newJsonFile = gson.toJson(savedSearch);
  vars.put("jobSavedResponse", newJson);
  </code></pre>
  
  <p>Any suggestions on how to fix this?</p>