serialize Objective C to json