johnzon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: De/Serialization byte[]
Date Mon, 12 Jan 2015 20:41:50 GMT
got it but why base64, why not String or hexa? why priviledging one?
Would supporting global @Converter (registered through builder) would
help solving it?


Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau


2015-01-12 21:38 GMT+01:00 Hendrik Dev <hendrikdev22@gmail.com>:
> dont know if i got it. my idea was to have a global switch
> (treatByteArrayAsBase64) and then you can override this global switch
> with @JohnzonConverter for specific fields/props
>
>
> On Mon, Jan 12, 2015 at 9:16 PM, Romain Manni-Bucau
> <rmannibucau@gmail.com> wrote:
>> I wouldn't introduce treatByteArrayAsBase64 cause I want String
>> instead - well not true but you get the point ;). JohnzonConverter
>> should clearly work and should do the trick. I would just align 1-1 on
>> java (ie byte = small int)
>>
>> wdyt?
>>
>>
>> Romain Manni-Bucau
>> @rmannibucau
>> http://www.tomitribe.com
>> http://rmannibucau.wordpress.com
>> https://github.com/rmannibucau
>>
>>
>> 2015-01-12 21:12 GMT+01:00 Hendrik Dev <hendrikdev22@gmail.com>:
>>> see https://git-wip-us.apache.org/repos/asf?p=incubator-johnzon.git;a=commit;h=92098f4561c80a569c8349d8132369dcfa998e08
>>>
>>> Its not yet customizable with @JohnzonConverter, but its a general
>>> option for the mapperbuilder.
>>> I struggled with @JohnzonConverter but it its important because it
>>> allows a more fine grained control
>>>
>>> default is int array
>>>
>>> On Mon, Jan 12, 2015 at 2:26 PM, Romain Manni-Bucau
>>> <rmannibucau@gmail.com> wrote:
>>>> +1 for ints (bytes actually ;)).
>>>>
>>>> this should still be customizable with @JohnzonConverter BTW
>>>>
>>>>
>>>> Romain Manni-Bucau
>>>> @rmannibucau
>>>> http://www.tomitribe.com
>>>> http://rmannibucau.wordpress.com
>>>> https://github.com/rmannibucau
>>>>
>>>>
>>>> 2015-01-12 13:17 GMT+01:00 Hendrik Dev <hendrikdev22@gmail.com>:
>>>>> do we want to serialize a byte array into a sequence of int's (eg
>>>>> [2,5,0,9, ...]) or as a base64 encoded string? or we make it
>>>>> configurable and define a default?
>>>>>
>>>>> --
>>>>> Hendrik Saly (salyh, hendrikdev22)
>>>>> @hendrikdev22
>>>>> PGP: 0x22D7F6EC
>>>
>>>
>>>
>>> --
>>> Hendrik Saly (salyh, hendrikdev22)
>>> @hendrikdev22
>>> PGP: 0x22D7F6EC
>
>
>
> --
> Hendrik Saly (salyh, hendrikdev22)
> @hendrikdev22
> PGP: 0x22D7F6EC

Mime
View raw message