Added an option for more flexible JSON processing. Pass in a work block for much more custom behavior.