half way to json decoding