I'd like to validate json contains a list of key/values before attempting to marshall into a case class using lift-json. The data might be nested.
For example:
{
"name": "stack",
"desc": "desc",
"age": 29,
"address": {
"street": "123 elm",
"postal_code": 22222,
"city": "slc",
}
}
What are ways I can verify this JSON contains values for "name", "age", and "address\street"? Assume all other fields are optional.
Sorry if I'm missing something obvious, but I suspect something like this has been solved before.
By the way, anyone try Orderly? https://github.com/nparry/orderly4jvm