mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-08-10 22:41:51 +02:00
fix proc doc - output is dict or list of dicts
This commit is contained in:
@@ -127,7 +127,9 @@ Examples:
|
|||||||
### parse
|
### parse
|
||||||
|
|
||||||
```python
|
```python
|
||||||
def parse(data: str, raw: bool = False, quiet: bool = False) -> List[Dict]
|
def parse(data: str,
|
||||||
|
raw: bool = False,
|
||||||
|
quiet: bool = False) -> Union[List[Dict], Dict]
|
||||||
```
|
```
|
||||||
|
|
||||||
Main text parsing function
|
Main text parsing function
|
||||||
@@ -140,7 +142,7 @@ Parameters:
|
|||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
List of Dictionaries. Raw or processed structured data.
|
Dictionary or List of Dictionaries. Raw or processed structured data.
|
||||||
|
|
||||||
### Parser Information
|
### Parser Information
|
||||||
Compatibility: linux
|
Compatibility: linux
|
||||||
|
@@ -119,7 +119,7 @@ Examples:
|
|||||||
"""
|
"""
|
||||||
import re
|
import re
|
||||||
import importlib
|
import importlib
|
||||||
from typing import List, Dict
|
from typing import List, Dict, Union
|
||||||
import jc.utils
|
import jc.utils
|
||||||
from jc.exceptions import ParseError
|
from jc.exceptions import ParseError
|
||||||
|
|
||||||
@@ -141,7 +141,7 @@ def parse(
|
|||||||
data: str,
|
data: str,
|
||||||
raw: bool = False,
|
raw: bool = False,
|
||||||
quiet: bool = False
|
quiet: bool = False
|
||||||
) -> List[Dict]:
|
) -> Union[List[Dict], Dict]:
|
||||||
"""
|
"""
|
||||||
Main text parsing function
|
Main text parsing function
|
||||||
|
|
||||||
@@ -153,7 +153,7 @@ def parse(
|
|||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
List of Dictionaries. Raw or processed structured data.
|
Dictionary or List of Dictionaries. Raw or processed structured data.
|
||||||
"""
|
"""
|
||||||
jc.utils.input_type_check(data)
|
jc.utils.input_type_check(data)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user