Feature/json document generator

Merge this again...