implement DCaseTree -> json