Comments (3)
Hi,
I just call the method: ListLanguageTranslations and the app crashes.
crash line:
ResponseList<LanguageTranslations> langTranslations = await client.StringTranslations.ListLanguageTranslations(kCrowdInProjectId, "fr");
crash message:
Newtonsoft.Json.JsonSerializationException: "Could not create an instance of type Crowdin.Api.StringTranslations.LanguageTranslations. Type is an interface or abstract class and cannot be instantiated. Path 'stringId', line 2, position 13."
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMember, JsonProperty containerProperty, String id, Boolean& createdFromNonDefaultCreator)\n at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)\n at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)\n at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)\n at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)\n at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)\n at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)\n at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)\n at Crowdin.Api.Core.JsonParser.ParseResponseObject[TData](JObject rootElement) in DOC/crowdin-api-client-dotnet-main/src/Crowdin.Api/Core/JsonParser.cs:line 53\n at Crowdin.Api.Core.JsonParser.ParseResponseObject[TData](JToken token) in DOC/crowdin-api-client-dotnet-main/src/Crowdin.Api/Core/JsonParser.cs:line 43\n at System.Linq.Enumerable.SelectIListIterator2.ToList()\n at System.Linq.Enumerable.ToList[TSource](IEnumerable
1 source)\n at Crowdin.Api.Core.JsonParser.ParseResponseList[TData](JObject rootElement) in DOC/crowdin-api-client-dotnet-main/src/Crowdin.Api/Core/JsonParser.cs:line 58\n at Crowdin.Api.StringTranslations.StringTranslationsApiExecutor.d__12.MoveNext() in DOC/crowdin-api-client-dotnet-main/src/Crowdin.Api/StringTranslations/StringTranslationsApiExecutor.cs:line 144\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\n at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\n at $.<
Thanks.
from crowdin-api-client-dotnet.
Hi @fenghen1001!
Could you please provide clear steps to reproduce this issue? Also please add the error message.
Thanks.
from crowdin-api-client-dotnet.
Hi @fenghen1001. Please check fix/language-translations
branch and let me know if the issue is fixed or not.
Unfortunately we can't accept your suggested implementation, because there could be objects different by type in one response list. Please check runtime type and downcast each object to its end type separately
from crowdin-api-client-dotnet.
Related Issues (20)
- Strings Exporter Settings API HOT 2
- Apply Pre-Translation API: add labels support HOT 3
- Applications API support HOT 8
- Report Settings Template: add the `isPublic` property support HOT 1
- Source Files: add the `context` property support HOT 4
- `WorkflowsApiExecutor` is not accessible in the `CrowdinApiClient` class HOT 2
- Strings translations APIs: add new parameters support HOT 2
- NuGet package: add Readme HOT 1
- Screenshots APIs: add the `labelIds` parameter support HOT 3
- Applications API: add support for new endpoints HOT 5
- StringBatchOperations return null HOT 7
- String-based API support HOT 6
- Security Logs API support
- List Language Translations API: support new parameters HOT 3
- Fields API support HOT 6
- Custom fuzzy match types in translation cost report HOT 1
- Remove the `markAddedTranslationsAsDone` parameter
- Tasks API updates
- UploadTranslations not working for XLIFF file HOT 3
- AI API support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crowdin-api-client-dotnet.