Full working version with doc.
Swtich to json.