You can use the extract directive as
def rawJson = extract { _.request.entity.asString} . . . case "value2" => rawJson{ json =>// use the json }