Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A MaxAliasLength of 128 breaks serialization of long keys #394

Open
Place1 opened this issue Apr 3, 2019 · 5 comments
Open

A MaxAliasLength of 128 breaks serialization of long keys #394

Place1 opened this issue Apr 3, 2019 · 5 comments

Comments

@Place1
Copy link

Place1 commented Apr 3, 2019

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?

@aaubry
Copy link
Owner

aaubry commented Apr 4, 2019

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.

@Place1
Copy link
Author

Place1 commented Apr 7, 2019

@aaubry cheers! that's great news.

@Place1
Copy link
Author

Place1 commented Jun 23, 2019

hey @aaubry, would you like me to submit a PR for this change?

@aaubry
Copy link
Owner

aaubry commented Jun 24, 2019 via email

@Place1
Copy link
Author

Place1 commented Jun 25, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants