src-js/api.js
function ( data ) {
	    	if ( !data ) return data;
	    	if ( typeof data !== 'object' ) return data;
	    	if ( 'entrySet' in data && typeof data.entrySet === 'function' ) {
	    		//var allowed_long_keys = ['utc_timestamp', 'duration', 'type', 'token'];
	    		var set = data.entrySet();
	    		if ( !set ) return data;
	    		var obj = {};
	    		var iter = set.iterator();
	    		while ( iter.hasNext() ) {
					var entry = iter.next();
					var val = entry.getValue();
					if ( val && typeof val === 'object' && 
						 'entrySet' in val && 
						 typeof val.entrySet === 'function' ) val = convertData(val);
					var key = entry.getKey();
					if ( !key ) {
						throw( "Field key is not valid: " + key );
					}
					obj[entry.getKey()] = val;
				}
				return obj;
	    	} else {
	    		if ( 'utc_timestamp' in data ) data.utc_timestamp = jsDateToTs(data.utc_timestamp);
	    		if ( 'created_at' in data )    data.created_at 	  = jsDateToTs(data.created_at);
	    	}
	    	return data;
	    }
function ( data ) {
	    	if ( !data ) return data;
	    	if ( typeof data !== 'object' ) return data;
	    	if ( 'entrySet' in data && typeof data.entrySet === 'function' ) {
	    		//var allowed_long_keys = ['utc_timestamp', 'duration', 'type', 'token'];
	    		var set = data.entrySet();
	    		if ( !set ) return data;
	    		var obj = {};
	    		var iter = set.iterator();
	    		while ( iter.hasNext() ) {
					var entry = iter.next();
					var val = entry.getValue();
					if ( val && typeof val === 'object' && 
						 'entrySet' in val && 
						 typeof val.entrySet === 'function' ) val = convertData(val);
					var key = entry.getKey();
					if ( !key ) {
						throw( "Field key is not valid: " + key );
					}
					obj[entry.getKey()] = val;
				}
				return obj;
	    	} else {
	    		if ( 'utc_timestamp' in data ) data.utc_timestamp = jsDateToTs(data.utc_timestamp);
	    		if ( 'created_at' in data )    data.created_at 	  = jsDateToTs(data.created_at);
	    	}
	    	return data;
	    }
function ( data ) { if ( ! data ) return data ; if ( typeof data !== 'object' ) return data ; if ( 'entrySet' in data && typeof data . entrySet === 'function' ) { //var allowed_long_keys = ['utc_timestamp', 'duration', 'type', 'token']; var set = data . entrySet ( ) ; if ( ! set ) return data ; var obj = { } ; var iter = set . iterator ( ) ; while ( iter . hasNext ( ) ) { var entry = iter . next ( ) ; var val = entry . getValue ( ) ; if ( val && typeof val === 'object' && 'entrySet' in val && typeof val . entrySet === 'function' ) val = convertData ( val ) ; var key = entry . getKey ( ) ; if ( ! key ) { throw ( "Field key is not valid: " + key ) ; } obj [ entry . getKey ( ) ] = val ; } return obj ; } else { if ( 'utc_timestamp' in data ) data . utc_timestamp = jsDateToTs ( data . utc_timestamp ) ; if ( 'created_at' in data ) data . created_at = jsDateToTs ( data . created_at ) ; } return data ; }
Convert Processing.js HashMaps to JavaScript objects
Convert Processing . js HashMaps to JavaScript objects