viscid.vjson module¶
Wrap python’s json parser enabling comments and trailing commas
Comments are either # or //
-
viscid.vjson.
dump
(obj, f, **kwargs)[source]¶ Wrap Python’s
json.dump()
Parameters: - obj – some object that Python’s
json.dump()
understands - f – file-like object with a write method
- **kwargs – passed to Python’s
json.dump()
- obj – some object that Python’s
-
viscid.vjson.
dumps
(obj, **kwargs)[source]¶ Wrap Python’s
json.dumps()
Parameters: - obj – some object that Python’s
json.dumps()
understands - **kwargs – passed to Python’s
json.dumps()
- obj – some object that Python’s
-
viscid.vjson.
find_all
(s, substrings, start=0, end=None)[source]¶ Iterate all ocurances of sub in s
Parameters: - s (str) – whole string
- sub (str, list) – substring or list of substrings to find
Yields: index of start of sub in s
-
viscid.vjson.
load
(f, **kwargs)[source]¶ Read file and pass to
loads()
Parameters: - f – file-like object with a read method
- **kwargs – passed to
loads()