implement references in json