I have some JSON that looks like this {'images': [{'name': 'field-1', 'value': 'http://example.com/foo'}, {'name': 'field-2', 'value': 'http://example.com/bar'}, ...]}.
What I'd like to know is what is the best way to validate each of these name-value pairs as though they were fields? In particular, I need them to be optional and valid URLs.
I have some JSON that looks like this
{'images': [{'name': 'field-1', 'value': 'http://example.com/foo'}, {'name': 'field-2', 'value': 'http://example.com/bar'}, ...]}.What I'd like to know is what is the best way to validate each of these name-value pairs as though they were fields? In particular, I need them to be optional and valid URLs.