Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ncredinburgh/iata-parser
A parser for the boarding pass format described in IATA Resolution 792
https://github.com/ncredinburgh/iata-parser
Last synced: 3 days ago
JSON representation
A parser for the boarding pass format described in IATA Resolution 792
- Host: GitHub
- URL: https://github.com/ncredinburgh/iata-parser
- Owner: ncredinburgh
- License: apache-2.0
- Created: 2015-09-22T10:30:59.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2020-10-13T08:33:29.000Z (about 4 years ago)
- Last Synced: 2024-08-02T05:07:12.750Z (3 months ago)
- Language: Java
- Homepage:
- Size: 38.1 KB
- Stars: 29
- Watchers: 11
- Forks: 12
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# iata-parser
### Description
Implements a parser for the boarding pass format described in IATA Resolution 792 - Version 5.This specification (in conjunction with others) can be downloaded [here](http://www.airlineinfo.com/ostpdf88/98.pdf).
### Usage
public class Main
{
public static void main(String[] args) throws Exception
{
// Create code
IataCode code = new Parser().parse("M1DESMARAIS/LUC EABC123 YULFRAAC 0834 226F001A0025 100");
// Print code
try (OutputStreamWriter writer = new OutputStreamWriter(System.out))
{
IataCodes.walk(code, new Printer(new SpecificationFormatter(), writer));
}
}
}
#### Strict ModeA parser may be configured to _strictly_ validate the supplied code according to the allowed types & values defined in
Resolution 792. When enabled any value outside an allowed range for that element will throw a exception detailing
the problem.To enable "strict mode" do the following:
Parser strictParser = new Parser().strict(); // Returns a new parser with strict mode enabled.### Links
* [IATA Resolution 792 - Version 3](http://www.iata.org/whatwedo/stb/documents/resolution792-june2010.pdf)
### Author
[NCR Edinburgh](http://ncredinburgh.com/)
### License
This project is licensed under the Apache v2 license. See the [LICENSE](LICENSE.txt) file for more info.