cubing/wca-workbook-assistant — pull request #72 by jfly (2014-02-21 09:57:01+00:00)
Title: Cleaned up implementation of #48.

Yay static typing! I think I found a bug with the position attribute. It was a String in the old code, I've changed it to an int.

I took the liberty of changing the json spec on https://github.com/cubing/wca-workbook-assistant/issues/48:

1. renamed the top level object from Result -> Competition (note, this doesn't actually effect the resulting json)
2. "results" attribute renamed to "events"

I put all the wca json models in a new org.worldcubeassociation.workbook.wcajson package. They should match the specification on #48 perfectly.

I ran into an issue with the tsv parsing. I didn't really look into it, just changed the code to add the lines with asterisks (that last call to scanner.next() was crashing for me, I'm on Windows, so it might be a line ending thing)

```
Scanner scanner = new Scanner(countriesStream, "UTF-8");
scanner.useDelimiter("[\t\n\r\f]");
while (scanner.hasNext()) {
String countryId = scanner.next();
String iso3166Code = scanner.next();
if(scanner.hasNext()) { // ***************
scanner.next();
} // ***************
sCountryCodes.put(countryId, iso3166Code);
}
scanner.close();
```