Function encode

  • Encodes the given segment to be used as part of a JSON Pointer

    JSON Pointer has special meaning for "/" and "~", therefore these must be encoded

    Parameters

    • segment: string

    Returns string