You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some of the GS1 barcodes I am scanning contain some silly dates, such as '000000'. Currently parsing fails completely, as month 0 and day 0 are not a valid month/day respectively.
Is it possible to decide how certain errors are handled, and if they should fallback to defaults or fail completely?
Example of a GS1 barcode that fails: 019906600092731431030078881500000010215359
The text was updated successfully, but these errors were encountered:
Currently, Biip has no configuration options for making the parsing more lenient. It follows the GS1 specifications quite strictly.
However, being able to control Biip's strictness has surfaced as a request several times now, so I think this is the highest prioritized item for any further development of Biip.
Thanks for the swift reply. I really like libraries that are strict with specs, so thanks for doing this.
I will probably end up using biip because it seems like a great library and since I'll have to find a way to parse such barcodes I'll probably fork it and write a PR for this.
I was thinking of writing a class with most of the things currently defined in biip (such as _parse_date()), so that users import that class and configuring it, should they need to. Importing parse directly will give you the parse method with the defaults, as it currently works.
Hello!
Some of the GS1 barcodes I am scanning contain some silly dates, such as '000000'. Currently parsing fails completely, as month 0 and day 0 are not a valid month/day respectively.
Is it possible to decide how certain errors are handled, and if they should fallback to defaults or fail completely?
Example of a GS1 barcode that fails:
019906600092731431030078881500000010215359
The text was updated successfully, but these errors were encountered: