- Home /
Question by
ashwin_dinesh · Apr 07, 2019 at 01:07 PM ·
objectjavaandroidpluginunitypackagejava to c#
How to convert Dictionary to Java HashMap
I am developing a unity-package which includes an Android library in Java. This library contains a method which accepts a HashMap<String, Object> as parameter.
I want to pass a Dictionary<string, object> in C# to this Java method, for this I might need to convert this Dictionary to HashMap.
Can someone please help me with this?
PS: In short, I need to convert C# object to Java Object.
Comment
I think you're better off sending the dictionary as a JSON string then parsing into the Hash$$anonymous$$ap format on the Java side.