elnabo / json2object

Type safe Haxe/JSON (de)serializer
MIT License
66 stars 17 forks source link

JsonParser(errors, putils, errorType) are undocumented #95

Open EliteMasterEric opened 11 months ago

EliteMasterEric commented 11 months ago

The arguments to JsonParser are not documented at all, I was trying to figure out if "Unknown variable" can be set to be ignored.

elnabo commented 10 months ago

Hello

putils and errorType are only used internally and there is almost no reason to use them. putils is used to determine the location of problems. errorType is used to determine how error in subobjects are handled.

errors will contains all the error/warning raised during the parsing. You can't ask to ignore the errors but you are in full control of what to do with the errors.

EliteMasterEric commented 10 months ago

I ended up making a patch on my fork which includes the ability to ignore the UnknownVariable error type so I can successfully retrieve a value if there are extra values in the JSON.