support passing encoded json to index functions