Code for portland 2014 json parser in javascript