Best format for sending Timestamps to JavaScript?
<p>When sending timestamps to JavaScript using REST for example I could use different formats. </p>

<pre><code>long timeInMillis = (new Date()).getTime();
</code></pre>

<p>or: </p>

<pre><code>String timeInMillis = ""+(new Date()).getTime();
</code></pre>

<p><strong>What is the preferred way of sending timestamps to JavaScript is it as long or as String from Java?</strong> </p>