Assuming you store the original JSON string as a String object in an
instance variable named "json" you could map it as any other string.

Or are you planning to store it as JSON object itself?
Esteban A. Maringolo


2015-03-12 16:50 GMT-03:00 Mariano Martinez Peck <marianop...@gmail.com>:
> Hi,
>
> In this link:
> https://github.com/svenvc/docs/blob/master/neo/neo-json-paper.md
>
> I see an example of a custom mapping like this one:
>
> mapper for: TestObject do: [ :mapping |
>     mapping mapInstVars: #(id name).
>     (mapping mapInstVar: #timestamp to: 'created-at') valueSchema:
> DateAndTime.
>     (mapping mapInstVar: #points) valueSchema: #ArrayOfPoints.
>     (mapping mapInstVar: #bytes) valueSchema: ByteArray ].
>
>
> I need something similar, but I need to store the original JSON string that
> was used to build a particular TestObject instance, in an instance variable
> of TestObject too. In other words, I need an instVar "originalResponse" in
> TestObject that would be set with the original JSON string.
>
> Any ideas how can I implement this?
>
> Thanks in advance,
>
> --
> Mariano
> http://marianopeck.wordpress.com

Reply via email to