Expand description
Documents are plain JSON objects in addok’s import format (name, type,
postcode, city, context, lat, lon, importance, housenumbers…).
Readers in crate::readers convert each data source into this format.
The helpers below reproduce how addok reads a document: a list holds a
default value followed by aliases, missing keys read as an empty string,
and values are stringified like Python’s str().
Functions§
- first_
f64 - First value of a key as a float (
importance,lat,lon). - first_
str - First value of a key, stringified;
Nonewhen it is null or falsy-empty. - py_str
- Python’s
str()on a decoded JSON value. - raw_
values Result._rawattr: the list of values of a key ([""]when missing).- str_
values - All values of a key, stringified.
- truthy
- Python truthiness of a JSON value.