Test Failed
Push — master ( 671bad...57d68d )
by Chris
01:27
created

valid_json()   A

Complexity

Conditions 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
dl 0
loc 7
rs 9.4285
1
"""Validators for various serialization formats."""
2
3
import json
4
5
6
def valid_json(formcls, field):
7
    """Validate field data as a json.
8
9
    :param formcls (object): The form class.
10
    :param field (str): The list of ips.
11
    """
12
    json.loads(field.data)
13