Total Complexity | 2 |
Total Lines | 7 |
Duplicated Lines | 0 % |
1 | # Licensed to the StackStorm, Inc ('StackStorm') under one or more |
||
23 | class JsonConverter(object): |
||
24 | |||
25 | def convert(self, items_list): |
||
26 | if not isinstance(items_list, list): |
||
27 | raise ValueError('Items to be converted should be a list.') |
||
28 | json_doc = json_encode(items_list) |
||
29 | return json_doc |
||
30 |