title: Injected members from the host language to arrive to guest language as guest language types
body: <p>This question is somewhat related to: 
  <a href="https://stackoverflow.com/questions/51669154/graalvm-using-polyglot-value-without-a-context">GraalVM - Using Polyglot Value without a context</a></p>
  
  <p>In my application, the code snippets run in the guest languages should not need to know that the arguments injected (through members of the bindings) are Java arguments. Instead, for people developing in the guest language, arguments should look like just another argument of the guest language itself.</p>
  
  <p>For example, I would like for an array injected from my Java host language to a JS guest script, in this fashion:</p>
  
  <pre><code>Value guestLanguageBindings = context.getBindings(scriptData.getLanguage().toString());
  
  guestLanguageBindings.putMember(argumentName, argumentValue);
  </code></pre>
  
  <p>to "arrive" to the guest language as a JS array, not as a java.util.ArrayList as it is happening right now. </p>
  
  <p>Currently I got around this problem by converting every non primitive type (I noticed that String, int, etc. arrive to JS as JS "types") to JSON and converting back in the guest language. </p>
  
  <p>This works, but I wonder if there is a more appropriate way to do it or if indeed using the bindings is the right way to go?</p>
  
  <p>Thanks!</p>