in reply to Re^3: how to get Perl hash in C#
in thread how to get Perl hash in C#

Hi,

Tha hash values are arrays. These arrays can contain some hash too. Below is the output from Data::Dumper.

I need these values imported av hash/"collection" in C#

$VAR1 = bless( { 'INTERFACE' => [ undef, 'vlanX' ], 'LOCATION' => 'X3', 'ACELOGICAL' => 'user', 'CHILD' => [ bless( { 'IPROUTE' => '0.0.0.0 0.0.0.0 x +xx.xxx.x.x.', 'NAME' => 'vlanX', 'ACE' => 'ACEx', 'CHILD' => [ bless( { 'IPROUTE' + => undef, 'NAME' => 'name', 'INTERFACE' => 'vlanX', 'ACE' => undef, 'SERVERFARM' => undef, 'CHILD' => [], 'OSID' => [], 'ALIAS' => undef, 'OBJECTID' => undef, 'PARENT' => [ $VAR1->{'CHILD'}[0] ], 'MASTERSHAPE' => 'ACE_RSERVER', 'CONTEXT' => 'Cntext', 'SHAPEID' => [], 'IPADDRESS' => 'xxx.xxx.x.xx' }, 'some value' ), 'IPROUTE' + => undef, 'NAME' => 'name', 'INTERFACE' => 'vlanX', 'ACE' => undef, 'SERVERFARM' => undef, 'CHILD' => [], 'OSID' => [], 'ALIAS' => undef, 'OBJECTID' => undef, 'PARENT' => [ $VAR1->{'CHILD'}[0] ], 'MASTERSHAPE' => 'ACE', 'CONTEXT' => 'some value ', 'SHAPEID' => [], 'IPADDRESS' => 'xxx.xxx.x.xx' }, 'some value' ), . . .

Replies are listed 'Best First'.
Re^5: how to get Perl hash in C#
by Corion (Patriarch) on Jan 27, 2014 at 08:10 UTC

    JSON cannot transport "objects". What would C# do with Perl classes?

    You will need to convert your objects to plain hashes (or arrays) that contain the relevant data.

      Thank you for your answer.

      I was not aware of that :(