jsonyx.load_query_value¶
- jsonyx.load_query_value(s, *, allow=NOTHING, use_decimal=False)[source]¶
Deserialize a JSON query value to a Python object.
Added in version 2.0.
- Parameters:
s (
str) – a JSON query valueallow (
Container[str], default:NOTHING) – the JSON deviations fromjsonyx.allowuse_decimal (
bool, default:False) – usedecimal.Decimalinstead offloat
- Raises:
JSONSyntaxError – if the query value is invalid
- Returns:
Any– a Python object
- Example:
>>> import jsonyx as json >>> json.load_query_value("'~'foo'") "'foo"