Emit references to entities in json output