Serialize to JSON with camelCase keys #4079
Unanswered
jonas-knupp-id
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello all,
pydantic allows to serialize models by alias (https://docs.pydantic.dev/1.10/usage/exporting_models/#modeljson). This way the model's attributes can be named in accordance with the Python naming convention (snake case) while the keys of the serialized JSON objects are in camelCase.
BentoML uses pydantic for the JSON IO Descriptors - so my question is whether it is possible to tell the BentoML framework to serialize to JSON with the "by_alias" argument set to True.
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions