Copying indirect() from the encoding/json package.