Perl Monk, Perl Meditation | |
PerlMonks |
Re: COnvert java hashmap to perl hashesby robby_dobby (Hermit) |
on Jun 17, 2015 at 05:15 UTC ( [id://1130749]=note: print w/replies, xml ) | Need Help?? |
Hello bansalam,
Expanding on what Corion said, here's the part where you need some form of serialization since this is boils down to communication between two different (or nearly same - how you look at it) cultures. JSON is certainly one way to serialize data between two different programs, there are others too. For example, XML, YAML and Google's protocol buffers are all valid solutions. You can even write out the Java HashMap to a text file(HashMap's toString() should help) and read from that file using perl. Of course, there are modules available on CPAN for every one of these formats. JSON, YAML and Google::ProtocolBuffers come to mind. Pick the simplest and get to work. Have fun! :-)
In Section
Seekers of Perl Wisdom
|
|