Extracting Raw JSON as String inside a Spray POST route Extracting Raw JSON as String inside a Spray POST route json json

Extracting Raw JSON as String inside a Spray POST route


You can use the extract directive as

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