json representation of an fptree