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: Mapper: how to map char and char[]
Date Fri, 15 Aug 2014 20:45:12 GMT
First one for sure. Array stucture should be kept otherwise use a string.

Ps: what is current serialization?
Le 15 août 2014 21:39, "Hendrik Dev" <hendrikdev22@gmail.com> a écrit :

> Given a class like
>
>   public static class CharClass {
>
>         private char charValue;
>         private char charArr[];
>
>         public char[] getCharArr() {
>             return charArr;
>         }
>
>         public void setCharArr(char[] charArr) {
>             this.charArr = charArr;
>         }
>
>         public char getCharValue() {
>             return charValue;
>         }
>
>         public void setCharValue(char charValue) {
>             this.charValue = charValue;
>         }
>
>     }
>
> how to we want to map char (assume 'U') and char[] (assume 'G','O') ?
>
> Something like;
>
> {"charArr":["G","O"],"charValue":"U"} OR
> {"charArr":"GO","charValue":"U"} OR
> {"charArr":[71,79],"charValue":85} OR
> ...
>
> I would go for {"charArr":"GO","charValue":"U"} because its IMHO that
> what one would expect.
>
> Wdyt?
>
> Hendrik
>
> --
> Hendrik Saly (salyh, hendrikdev22)
> @hendrikdev22
> PGP: 0x22D7F6EC
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message