[Seaside] Failing test for #fromJson:

Philippe Marschall philippe.marschall at gmail.com
Wed Jun 20 15:02:43 UTC 2012

On Wed, Jun 20, 2012 at 2:23 PM, Tomas Kukol <tomas.kukol at gmail.com> wrote:
> Hello,
> I have created a test for #fromJson: message.
> MJTestFromJson >> testFromJsonWithAddress
>       | person address |
>       person := MJTestPerson fromJson:
> '{"Name":"Tomas","Address":{"PostalCode":"19800","City":"Prague"}}'.
>       self assert: person name equals:  'Tomas'.
>       address := person address.
>       self assert: address isNil not.
>       self assert: address postalCode equals: '19800'.
>       self assert: address city equals: 'Prague'.
> But the test fails because it cannot find PostalCode in MJTestPerson
> instace (should be probably in MJTestAddress). Is it a problem of my
> #fromJson: usage or wrong implementation of JSON deserialization?

Are you using Magritte-JSON? If you can you show us the descriptions,
ideally attach the whole MJTestPerson class?


More information about the seaside mailing list