JWambaugh / TJSON

The tolerant JSON parser for Haxe
78 stars 25 forks source link

Modified encodeAnonymousObject to also go through fields of class instance. #10

Closed Antriel closed 10 years ago

Antriel commented 10 years ago

Maybe it would be a good idea to rename the function to just encodeObject? I didn't do it as I didn't want to do too big a change. Also it should be possible to parse JSON directly to class instance (not anonymous object), just need to also store class name and have it available when parsing. Similar to how Haxe serialization works.

JWambaugh commented 10 years ago

Looks good. thanks.

JWambaugh commented 10 years ago

Could you do me a favor and add a unit test for this in https://github.com/martamius/TJSON/blob/master/tests/TestParser.hx Thanks.