FasterXML/jackson-module-scala — pull request #52 by nbauernfeind (2012-12-11 08:18:54+00:00)
Title: Create a companion sorter to prevent accidental human error. 

I promised you I would do this for you some day, and hopefully later is better than never =).

The two goals were 1) address that you felt the code looked like a hack, and 2) prevent any future accidental human error (since it's non-obvious what the hierarchy is if you haven't memorized those things yet). Note that both companion lists are adding each companion object in alphabetical order (partly to demonstrate that the topological sort works, and partly to do something that's maintainable).

I'd be willing to change anything that you'd like to see a little different. This was my first cut at it and it definitely demonstrates what I had hoped it would, but I haven't written topological sort in a long time.