Add doctest for deserialization of JSON encoded samples.