[
https://issues.apache.org/jira/browse/AVRO-36?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12722118#action_12722118
]
Scott Carey commented on AVRO-36:
---------------------------------
{quote}URL encoding is more compact in some cases, but transforms many textual
characters, like turning spaces to pluses.{quote}
Only if it is required that the string be fully URL encoded. It merely needs
to be able to be URL decoded properly. So spaces, slashes, dots, colons and
other things illegal in an URL don't have to be url encoded -- its only the
decoder that has to work, so I think only '%', '+', and anything that can't go
inside a JSON string are illegal printable characters that have to be escaped.
Therefore, [0,65,66, 20,67,255] could be valid as:
"%00AB+C%FF" OR
"%00AB C%FF" OR
"%00AB%20%FF"
And "This is a default !? /$#@()" would be valid as well in the URL encoding
case
Furthermore, this is not incompatible with the code point proposal.
Unprintable bytes could be represented with code points or url encode escapes.
Only "+" and "%" are required to be escaped. The built-in JSON string
converter would parse out code points and other stuff ( does it turn \t into
tab and \n into newline, etc?), and a url decode pass could convert the rest.
I guess this really just complicates it, but it is an option.
> binary default values do not decode base64
> ------------------------------------------
>
> Key: AVRO-36
> URL: https://issues.apache.org/jira/browse/AVRO-36
> Project: Avro
> Issue Type: Bug
> Components: java
> Reporter: Doug Cutting
> Assignee: Doug Cutting
>
> The specification says that default values for binary data are base64 encoded
> text, but the Java implementation uses the raw bytes of the textual value,
> and does not perform base64 decoded as specified.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.