Closed T1mL3arn closed 8 years ago
default bendPositive is true
Issue about quotes, not default values. JSON parser can parse true
or false
as boolean values. But parser interprets "true"
or "false"
as string, so is need extra code to convert string into boolean. In spec bendPositive is real bool. But in exported json (DB Pro 4.6.1) it is string. Is it a spec mistake or a bug with DB Pro export?
Yes, it's DB Pro export bug, but in runtime it is convert string into boolean. https://github.com/DragonBones/DragonBonesAS/blob/dev/DragonBones/src/dragonBones/parsers/ObjectDataParser.as#L51-L65
Thanks for clarification!
In spec (https://github.com/DragonBones/DragonBonesAS/blob/master/docs/DragonBones%204.5%20%E6%95%B0%E6%8D%AE%E6%A0%BC%E5%BC%8F%E6%A0%87%E5%87%86%E8%AF%B4%E6%98%8E.md)
but in exported json file it is in quotes:
Is possible to work with both, but which way is right?