[twitter-dev] Re: Status id documentation

2009-10-05 Thread Cameron Kaiser

 I hadn't looked at this in a while, but apparently the status id
 format has changed in the JSON response.
 
 I see a live example such as:
 
  'id' = ( {
   'value' = [
'2050382',
'463'
  ],
   'sign' = '+'
 }, 'Math::BigInt' ),

This looks like Perl. Are you sure you're really dumping the Twitter
object?

-- 
 personal: http://www.cameronkaiser.com/ --
  Cameron Kaiser * Floodgap Systems * www.floodgap.com * ckai...@floodgap.com
-- Why did the chicken cross the Moebius strip? To get to the other ... uh ...


[twitter-dev] Re: Status id documentation

2009-10-05 Thread BlueSkies


Yes, it was Perl ...

This obviously wasn't JSON.  It was the output of Data::Dumper that
produced this.

I guess I should get more sleep.

Thanks,

Scott



On Oct 5, 1:35 pm, Cameron Kaiser spec...@floodgap.com wrote:
  I hadn't looked at this in a while, but apparently the status id
  format has changed in the JSON response.

  I see a live example such as:

   'id' = ( {
                        'value' = [
                                     '2050382',
                                     '463'
                                   ],
                        'sign' = '+'
                      }, 'Math::BigInt' ),

 This looks like Perl. Are you sure you're really dumping the Twitter
 object?

 --
  personal:http://www.cameronkaiser.com/--
   Cameron Kaiser * Floodgap Systems *www.floodgap.com* ckai...@floodgap.com
 -- Why did the chicken cross the Moebius strip? To get to the other ... uh ...


[twitter-dev] Re: Status id documentation

2009-10-05 Thread Cameron Kaiser

 A followup to this for those that are interested:
 
 My real problem wasn't Data::Dumper, but rather the use of JSON::DWIW
 
 It turns out that that module will convert a number into a
 Math::BigInt object if the number is too large to be represented
 natively and the Math::BigInt module is installed.  If Math::BigInt
 isn't installed, the number is turned into a string to prevent data
 loss.
 
 For consistent behaviour, I will probably pre-emptively convert raw
 numbers to strings prior to processing by JSON::DWIW.

FWIW (not DWIW ;-), I just natively eat the numbers. Perl will happily
accept numbers over int size; they are treated internally as strings, but
can still have math operations performed on them. Above a certain quantity
of significant digits this will break down, but for Twitter purposes that
ceiling is quite high.

-- 
 personal: http://www.cameronkaiser.com/ --
  Cameron Kaiser * Floodgap Systems * www.floodgap.com * ckai...@floodgap.com
-- There is always one more imbecile than you counted on. -