Minor bugfix in JSON convertion to have .attributes consistently