some work on json deserialisation