HaraldWalker/user-agent-utils — pull request #52 by fauxsoup (2014-06-18 16:07:10+00:00)
Title: Modifications and package for exporting data to JSON

These modifications allow dumping of the hierarchical Browser and OperatingSystem lists to JSON, allowing for implementations in other languages. Only important details are dumped, and I generally used the friendlier enumeration name for things like manufacturer, rendering engine, and family names.

A few modifications were made to the objects to allow for easier dumping, including adding static functions to retrieve the top-level OS/Browsers, and preserving the string form of the version regex so that it can be included in the dump.

I have done this because your method is *by far* the most efficient method for parsing User Agent strings I have yet encountered, but is woefully unavailable outside of Java because of your use of constants/enumerations (though this also contributes to the efficiency of the operation).

To see it in action, merely execute the main function in fauxsoup.Extract (open to renaming this package),