added ability to deserialize other encodings in JSON serializer