parse classes from json