public static String stringifyValue ( Param param , ObjectMapper mapper ) { assert ! ( param instanceof BinaryParam ) ; if ( param . value instanceof String ) return ( String ) param . value ; if ( param . value instanceof Date ) return Long . toString ( ( ( Date ) param . value ) . getTime ( ) / 1000 ) ; else if ( param . value instanceof Number ) return param . value . toString ( ) ; else return JSONUtils . toJSON ( param . value , mapper ) ; }
Stringify the parameter value in an appropriate way . Note that Facebook fucks up dates by using unix time - since - epoch some places and ISO - 8601 others . However maybe unix times always work as parameters?