Improved JSON deserializing