I have an impression that there is a bug in the writer. While the following example works:
String streamContents: [ :stream |
(NeoJSONWriter on: stream)
for: Point do: [ :mapping |
mapping mapAllInstVars.
mapping allowNil ];
for: Rectangle do: [ :mapping |
(mapping mapInstVar: #origin) valueSchema: Point.
(mapping mapInstVar: #corner) valueSchema: Point ];
nextPut: Rectangle new ].
-=-=-=-
the following example does not work:
-=-=-=-
String streamContents: [ :stream |
(NeoJSONWriter on: stream)
for: Point do: [ :mapping |
mapping mapAllInstVars.
mapping allowNil ];
for: Rectangle do: [ :mapping |
(mapping mapInstVar: #origin) valueSchema: Point.
(mapping mapInstVar: #corner) valueSchema: Point ];
writeNil: true;
nextPut: Rectangle new ].
-=-=-=-