behrang / YamlSwift

Load YAML and JSON documents using Swift
MIT License
404 stars 97 forks source link

cannot parse this file,but other parser can. #75

Closed iCodist closed 6 years ago

iCodist commented 6 years ago

I like YamlSwift, it's so cool, thank you!

When I parse the following file, it crashed.

double_pinyin_flypy.schema.yaml.zip

seivan commented 6 years ago

Can you paste your YAML here?

iCodist commented 6 years ago

ok

https://gist.github.com/iCodist/df1e74ef7506ce3f19315ba4b7ed10c6

seivan commented 6 years ago

@iCodist Can you take a look at https://github.com/behrang/YamlSwift/tree/feature/investigate_char_bug

Seems related to one of the characters (\xFF0C) used sans quotation marks. I'm working on a parsec replacement, so I might not get time to get around this. Adding quotes resolves the issue: states: [ "。,", ".," ]

Is that good enough?

seivan commented 6 years ago

@iCodist Let me know if doesn't work.