Okay, additional tests follow:

use Data::Dumper;
use JSON;
%a = (
      'foo' => 1,
      'bar' => 0,
      'baz' => 'xyzzy',
      'fred'=> "1",
      'barney'=> "0",
     );
$j = to_json( \%a );
print "dump:\n", Dumper(\%a), "\n";
print "json:\n", Dumper($j), "\n";

results:
dump:
$VAR1 = {
          'barney' => '0',
          'bar' => 0,
          'baz' => 'xyzzy',
          'foo' => 1,
          'fred' => '1'
        };

json:
$VAR1 = '{"barney":"0","bar":0,"baz":"xyzzy","foo":1,"fred":"1"}';

which shows that json conversion indeed cares whether it's a numeric
or a string. and here's the dump of movabletype $status:
state is:
$VAR1 = {
          'is_banned' => '0',
          'is_authenticated' => '0',
          'can_comment' => '0',
          'can_post' => '0',
          'is_anonymous' => '1',
          'is_trusted' => '0'
        };

So yes, they are all strings, while they somehow should not be.



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to