spray-json
spray-json copied to clipboard
Add a validator to JsonParser
It would be really nice to have a JSON validator as part of spray json, instead of having to wrap the dangerous json string in a Try. Maybe something like
JsonParser.isValid("""{ "key": "value" }""") // true
JsonParser.isValid("""{ "key : value"}""") // false (missing a quote after 'key'
Yes, thanks. Good idea!