assign logic moved to json