[haXe] Just a suggestion

Nicolas Cannasse ncannasse at motion-twin.com
Thu Dec 6 20:32:03 CET 2007


> hi
> 
> when dealing with data JSON data returned from a URLRequest, i often do:
> var json = Json.decode(strdata);
> json.extents[0]; // no side effect.
> 
> so the compiler knows that json.extents is an array. would these
> changes prevent that?

Yes it would cause in error in that case.

> is there a preferred to do that? i guess Reflect.field()...

If I make the change, var tmp = json.extents[0]; would work.

Nicolas




More information about the Haxe mailing list