Pure functional transformations for the json4s and Play JSON ASTs