public static String print(Object object) {
    StringBuilder builder = new StringBuilder();

    appendJRuby(builder, object);

    return builder.toString();
  }
Utility class for converting objects to JRuby. It handles null, Boolean, Number, String, byte[],
List&lt;Object&gt;, Map&lt;String, Object&gt; structures.
<p>
E.g.

<pre>
Map&lt;String, Object&gt; map = new LinkedHashMap&lt;&gt;();
map.put("null", null);
map.put("boolean", true);
map.put("number", 1);
map.put("string", "str");
map.put("binary", new byte[] { 1, 2, 3 });
map.put("list", Lists.newArrayList(1, "2", true));
</pre>
</p>
<p>
Calling {@link #print(Object)} method will result:

<pre>
{ null =&gt; '', boolean =&gt; 'true', number =&gt; '1', string =&gt; 'str',
  binary =&gt; '010203', list =&gt; [ '1', '2', 'true' ] }
</pre>
</p>
hbase-common/src/main/java/org/apache/hadoop/hbase/util/JRubyFormat.java