YamlDotNet
YamlDotNet copied to clipboard
A MaxAliasLength of 128 breaks serialization of long keys
I'm using a library called NSwag which makes use of this library for serializing a yaml file to a json string. I've run into an issue where I have a key of length 129 characters and this causes a ? to be written to the output JSON.
Here's my bug report over at NSwag: link and specifically my comment describing the problem in detail: link.
Essentially the MaxAliasLength defined here is causes any key that's longer than 128 characters to be emitted as a ?.
Why does this limit exist? Can it be removed? Is there a work around?
I've checked the code and I think there's no particular reason for this limit. It is probably a leftover from the original C code from which the parser was ported. I will remove this limit in the next release.
@aaubry cheers! that's great news.
hey @aaubry, would you like me to submit a PR for this change?
Sure, please do. Thanks
Antoine Aubry
On Jun 24, 2019, 00:36, at 00:36, PLACE [email protected] wrote:
hey @aaubry, would you like me to submit a PR for this change?
-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/aaubry/YamlDotNet/issues/394#issuecomment-504797757
hmm, the line in question is already gone. perhaps someone else fixed it already. i'll ask NSwag to update to the latest version of this lib to see if the problem is resolved