Hmm, Ben,
Did you see NeoJSONCustomMapping's mapping method category ?��
There you can already find #listOfElementSchema:�� ��#listOfType:��
#listOfType:andElementSchema: as well as #mapWithValueSchema:
I am guessing they do what you want, no ? Or am I missing something as well ?
Sven
> On 16 Jun 2018, at 20:27, Ben Coman <btc@openinworld.com> wrote:
>
> hi Sven,
>
> With NeoJSON I have found several times in handling lists that
> I need to indirect through�� #for:customDo:�� like this......
>
>�� �� �� ��reader
>�� �� �� �� �� �� �� ��for: ExercismProblems
>�� �� �� �� �� �� �� ��do: [ :mapping |
>�� �� �� �� �� �� �� �� �� �� �� ��self halt.
>�� �� �� �� �� �� �� �� �� �� �� ��(mapper mapInstVar: #problems) valueSchema: #ArrayOfProblems ].
>�� �� �� ��reader
>�� �� �� �� �� �� �� ��for: #ArrayOfProblems
>�� �� �� �� �� �� �� ��customDo: [�� :mapping |
>�� �� �� �� �� �� �� �� �� �� �� ��mapper listOfElementSchema: ExercismProblem ].
>
>
> when I'd really like to be simpler and more concise like this...
>
>�� �� �� ��reader
>�� �� �� �� �� �� �� ��for: ExercismProblems
>�� �� �� �� �� �� �� ��do: [ :mapping |
>�� �� �� �� �� �� �� �� �� �� �� ��(mapping mapInstVar: #problems) listOfType: Array withElementSchema: ExercismProblem ].
>
> so I'm seeking your feedback on the following hack which facilitates that.
> (and if I missed something that already makes it simpler)
>