Haxe typedef cast to something meaningful in C#

I have a quite serious headache.
A middle-ware library has been developed for my project in Haxe (http://haxe.org/ ). Basically haxe is a meta language, to help cross platform and cross language development.
The problem is, the creator of the library used a lot of typedef-s which is a handy tool for avoiding a lot of class declarations (Typedef - Haxe - The Cross-platform Toolkit ).
The problem is, that the data sent in this structure has a type Object.
If I print it out it looks like a JSON or a JS object.

{ rounds : 804, strength : NaN, efficiency : NaN, win_ratio : NaN }

If you have any Idea or experience in dealing with such data, I would be glad to hear your ideas.
Have you tried any auto-map library in unity so far?
Thanks!

Update:

As @Bunny83 suggested I gathered more information. The library was build to form a layer between the server and the client, to avoid direct server calls from the client side code. Our library is a .NET assembly and it is part of the Unity project, so I have access to the source, and I could look up the calling method.
The actual type is “DynamicObject” which is not particularly helpful here.
As I went after the calling method. I have found that, the return type is actually haxe.ds.EnumValueMap which is a class made up by the haxe cross-compiler, and cast to DynamicObject.

return (((global::haxe.ds.EnumValueMap<object, object>) (global::haxe.ds.EnumValueMap<object, object>.__hx_cast<object, object>(((global::haxe.ds.EnumValueMap) (global::haxe.lang.Runtime.getField(p, "game_stats", 232010450, true)) ))) ).@get(t)).toDynamic();

In this point I don’t really know what to expect from you, I guess I have to Implement the cast from the EnumValueMap to a dictionary.

The haxe code is this in this particular example:

typedef GameStat = {
    rounds: Int,
    win_ratio: Float,
    strength: Float,
    efficiency: Float
}

First of all the type of the object most likely isn’t “object”. The method might return a reference of type “object” but the actual instance probably has a different type. When you “print” / “Debug.Log” the reference Unity just uses the ToString method of that object. So currently we don’t know if the object reference referes to a string in JSON format or if it’s a custom class instance which has an overridden ToString method which returns the data it contains as some sort of JSON. “NaN” usually isn’t an allowed value in JSON so it might only be just a string representation of the actual class.

You should try to figure out which type the actual value has and if you have access to that class. Just call the “GetType()” method on your object and read the “Name” property:

// C#
object yourReference;
Debug.Log("Type is: " + yourReference.GetType().Name);

This should tell you the classname of the actual class.

As far as i understood that meta language actually has cross compilers for different platforms. If the library actually is a .NET assembly you can simply view and inspect the Assembly by using a reflector like ILSpy. ILSpy allows you to view the code in IL (.NET / Mono Intermediate Language), C# or VB.NET

If the library is a .NET assembly and part of your Unity project, MonoDevelop and VisualStudio should recognise it’s containing namespaces / classes and provide autocomplete as long as the type is known.

We can’t tell you how to “use” that library since we have way less information than you have. We don’t even know what this library is good for. A library without a documentation is pretty pointless / useless.