Skip to main content

Module doc

Module doc 

Source
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; None when 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.

Type Aliases§

Document