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

Generated Python API returns wrong JSON #12457

Open
etnt opened this issue Aug 29, 2024 · 0 comments
Open

Generated Python API returns wrong JSON #12457

etnt opened this issue Aug 29, 2024 · 0 comments

Comments

@etnt
Copy link

etnt commented Aug 29, 2024

Hi,

Somewhere in the generated api_client.py __deserialize code the returned JSON:

 {'key:top': [{'name': 'Gunnar', 'surname': 'Green', 'age': 34, 'shoe-size': 47}]}

is wrongly converted to:

 {'keytop': [{'age': 34, 'name': 'Gunnar', 'shoe_size': 47, 'surname': 'Green'}]}

Note how the colon character has disappeared in 'key:top' !

Using colons like this is according to the how YANG data is encoding namespaces in JSON,
see: https://datatracker.ietf.org/doc/html/rfc7951#page-5

Reference to what I believe is the source code:

Cheers, Toby

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

No branches or pull requests

1 participant