working reducer-to-json parser