Closed tomkail closed 10 months ago
Interesting, I didn't change too much with voices
🤔
I've just fixed it by adding an underscore to the "name" backing field. I think the issue is that JSON.Net has been told to serialize the json property "name" into the property "Name", but because there's a field explicitly called "name" it's unsure which to write the json data into.
Same issue exists in VoiceSettings on stability and style.
It sounds like they changed something with the API itself.
Last time I ran this it wasn't a problem
I don't use underscore prefixes in member names, we ill probably come up with something else.
But I would also like an example to try and repro.
Did you somehow change the json serialization settings?
Bc the fields should be ignored by default
I haven't changed the json serialization settings used by the package, but it's possible our app replaces the default settings? I don't believe that would matter though, since you use ElevenLabsClient.JsonSerializationOptions on DeserializeObject
Hmm interesting bc I have not changed the implementation details of this class in almost 8 months, except for adding the name parameter to the constructor.
Ahh I've got it. This plugin adds a contract that serializes private types, even if marked with JsonIgnore. https://github.com/applejag/Newtonsoft.Json-for-Unity.Converters
Hello! I'm on the latest package.
When the inspector is looking at the Eleven Labs Configuration file or trying to load voices in the Dashboard, it repeatedly throws the error:
Newtonsoft.Json.JsonSerializationException: A member with the name 'name' already exists on 'ElevenLabs.Voices.Voice'. Use the JsonPropertyAttribute to specify another name.