adds if does not exist, returns json if exists