Validate if string is valid JSON.
Examples:
print(is_json('{"name": "Alice", "age": 25}')) -> True (object with string + number)
print(is_json("{name: 'Alice', age: 25}")) -> False (keys must be in double quotes, strings must use double quotes)
Instructions:
- Create the function in validators.py
- See and follow the used pattern
- Write test cases.
- Please do update the documentation too, github link: documentation link
Validate if string is valid JSON.
Examples:
print(is_json('{"name": "Alice", "age": 25}')) -> True (object with string + number)
print(is_json("{name: 'Alice', age: 25}")) -> False (keys must be in double quotes, strings must use double quotes)
Instructions: