add json for classes Class and ClassMethod