implemented #57 in CoreDataJSONCompatibility.swift