According to RFC 3986, the query string of a URI may contain sub-delims (including commas). Can we have an option to avoid percent-encoding them? Or possibly don't encode them by default?
Rationale
Leaving allowed sub-delims unencoded results in far more readable query strings with better overall usability. E.g., alpha,beta,gamma is better than alpha%2Cbeta%2Cgamma.
The RFC actually hints at the importance of this in section 3.4. In reference to percent-encoding / and ?, two examples of reserved delimiters that are allowed in query strings, it states:
...it is sometimes better for usability to avoid percent-encoding those characters.
I'm sure there are others, but one prominent use case is the include parameter in JSON API, as well as its filter recommendations.
Possible syntax
We could offer fine-grained control over which sub-delims are not percent-encoded.
jq.stringify(obj, {allowChars: [',']});
According to RFC 3986, the query string of a URI may contain sub-delims (including commas). Can we have an option to avoid percent-encoding them? Or possibly don't encode them by default?
Rationale
Leaving allowed sub-delims unencoded results in far more readable query strings with better overall usability. E.g.,
alpha,beta,gammais better thanalpha%2Cbeta%2Cgamma.The RFC actually hints at the importance of this in section 3.4. In reference to percent-encoding
/and?, two examples of reserved delimiters that are allowed in query strings, it states:I'm sure there are others, but one prominent use case is the
includeparameter in JSON API, as well as itsfilterrecommendations.Possible syntax
We could offer fine-grained control over which sub-delims are not percent-encoded.