Stef,

Do you still have trouble with this ?
It is really hard for me to help you without a reproducible case.

Sven

> On 16 Dec 2016, at 21:02, stepharong <stephar...@free.fr> wrote:
> 
>> 
>> Strange.
>> 
>> In Neo-JSON-Core-SvenVanCaekenberghe.37 in the class comment of 
>> NeoJSONMapper last paragraph before the examples.
> 
> sure I just meant that it was not visible enough.
> We should add for example
> 
> XXX >> neoJsonMapping: aMapper
> 
>       aMapper for: self do: [ :mapping |
>               mapping mapInstVars:
> #(#title #kind #hasDoc #grade #stars #isCollectorEdition #paidPrice #language 
> #zone)]
> 
> 
> 
>> 
>>> Now do you have an idea why I got this other missing class mapping for 
>>> bytestring?
>> 
>> You must have done something wrong ;-)
>> 
>> NeoJSONWriter toString: { 'string'. #symbol. 1. Float pi }.
>> 
>> '["string","symbol",1,3.141592653589793]'
> 
> I do not think so because my objects totally stupid.
> So this is why I was surprised.
> 
> 
> here are two
> 
> exampleKlonoa
>       <sampleInstance>
>       ^ self new      
>               title: 'Klonoa';
>               ps2;
>               threeStar;
>               grade: '(16/15)';
>               paidPrice: 1
> 
> 
> exampleWildArm
>       <sampleInstance>
>       ^ self new      
>               title: 'Wild Arm';
>               ps2;
>               threeStar;
>               grade: '(16/15)';
>               paidPrice: 1
> 
> only strings, numbers and symbols.
> this ByteString looked strange.
> 
> 
>> 
>>> Stef
>>> 
>>> On Fri, 16 Dec 2016 15:25:40 +0100, Sven Van Caekenberghe <s...@stfx.eu> 
>>> wrote:
>>> 
>>>> 
>>>>> On 16 Dec 2016, at 15:23, stepharong <stephar...@free.fr> wrote:
>>>>> 
>>>>> Ok I see.
>>>>> 
>>>>> I was doing
>>>>> 
>>>>> GameCollection >> neoJsonOn: neoJSONWriter
>>>>> 
>>>>>   neoJSONWriter
>>>>>           writeObject: games
>>>>> 
>>>>> 
>>>>> GameItem >> neoJsonOn: neoJSONWriter
>>>>>   self class instanceVariables
>>>>>           do: [ :each |
>>>>>                           neoJSONWriter writeObject: (self instVarNamed: 
>>>>> each) ]
>>>>> 
>>>>> 
>>>>> Now it did not work because byteString is not covered and I found that 
>>>>> strange.
>>>>> 
>>>>> I will use your solution.
>>>>> 
>>>>> I read the section 5 before so there is something missing there.
>>>>> I will see how I can add an example.
>>>>> 
>>>>> May be we should improve the class comment of mapper stating this class 
>>>>> methods.
>>>> 
>>>> It is right there, in NeoJSONMapper's class comment
>>>> 
>>>> ...
>>>> A mapping can be specified explicitely on a mapper, or can be resolved 
>>>> using the #neoJsonMapping: class method.
>>>> ...
>>>> 
>>>> This is the superclass of both NeoJSONReader and NeoJSONWriter.
>>>> 
>>>> But we should add it to the book chapter too.
>>>> 
>>>>> Stef
>>>> 
>>> 
>>> 
>>> --
>>> Using Opera's mail client: http://www.opera.com/mail/
>> 
> 
> 
> -- 
> Using Opera's mail client: http://www.opera.com/mail/


Reply via email to