Implement specific ptree type and json writer