function compileJSONPointer (path) {
  return path
    .map(p => ('/' + String(p)
      .replace(/~/g, '~0')
      .replace(/\//g, '~1')
    ))
    .join('')
}
Compile a JSON Pointer
WARNING: this is an incomplete implementation
@param {Array.<string | number>} path
@return {string}