Thank you Sven. I check those example. very helpfull.
But I use this method toJson to convert the stream to json and I get :
PrimitiveFailed: primitive #basicNew: in ByteString class failed toJson ^ String streamContents: [ :stream | (NeoJSONWriter on: stream) for: Date customDo: [ :mapping | mapping encoder: [ :value | value asDateAndTime printString ] ]; nextPut: data ] Did you see some errors.
Did you read https://ci.inria.fr/pharo-contribution/job/EnterprisePharoBook/lastSuccessfulBuild/artifact/book-result/NeoJSON/NeoJSON.html ? Did you check out the unit tests ? Some of them serve as examples. Checkout NeoJSONTestObject1 2 3 and the tests #testObject1 2 3 for example.On 19 Nov 2016, at 08:24, Asbath Sama biyalou via Pharo-users <pharo-users@lists.pharo.org> wrote: From: Asbath Sama biyalou <asamabiyalou@yahoo.com> Subject: NeoJSON with Rest Date: 19 November 2016 at 08:24:13 GMT+1 To: Pharo users users <pharo-users@lists.pharo.org> Hello. I want an example of implementation of neojson on a pharo object. I am trying to implement neoJsonOn: method on a pharo object but when I test I get a Character mapping not found in NeoJSONWriter. Thanks.