Haxe : shorthand for Json.parse(Json.stringify(obj))?

I can’t seem to find the method that returns a Dynamic object of the same form that running Json.parse(Json.stringify(OBJ)) would return, a Dynamic object which holds only the associated values of that object. Is there a method that does this? Do I have to do something like cast to Dynamic? Ideally it would be a method that works faster than the stringify followed by parse solution.

I don’t think there’s such a method, haxe is meant to be strongly typed, at least I haven’t seen it.

What are you trying to do exactly?

I sometimes find it useful serializing and deserializing Json-like Dynamic objects when I save object data to SharedObjects.

You could use the Haxe serializer class, though be careful of class references that might change over time, simple types (such as int, array, bool, float) should be most reliable when serializing