Add a __json__ method to HierarchicalNumber.
Remove semicolons, stop turning dict-members into attributes.