johnzon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hendrik Dev <hendrikde...@gmail.com>
Subject Re: De/Serialization byte[]
Date Mon, 12 Jan 2015 20:38:37 GMT
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